本文介绍了使用Inno Setup中格式化(部分粗体)的文本制作安装程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 任何人看到GOG.com游戏安装程序?如何在单个标题中显示包含Path和Need Size的欢迎文字字符串? 以下是修改安装路径后更改字符串换行的示例 解决方案您可以使用 TRichEditViewer 将 RFTText 属性和 UseRichEdit 设置为True。 尝试此示例 procedure CreateCustomPages; var 页面:TWizardPage; rtfHelpText:TRichEditViewer; s:string; begin Page:= CreateCustomPage(wpWelcome,自定义向导页面控件,粗体演示); Page.Surface.Align:= alCLient; s:='{\rtf1\ansi\ansicpg1252\deff0\deflang13322 {\fonttbl {\f0\fnil\fcharset0 Tahoma;}}'+ '\viewkind4\uc1\pard\f0\fs16这是一个正常的文本\b,这是一个粗体文本\b0\par}'; rtfHelpText:= TRichEditViewer.Create(Page); rtfHelpText.Parent:= Page.Surface; rtfHelpText.Left:= 0; rtfHelpText.Top:= 0; rtfHelpText.Width:= Page.SurfaceWidth; rtfHelpText.Height:= Page.SurfaceHeight; rtfHelpText.Scrollbars:= ssVertical; rtfHelpText.ReadOnly:= True; rtfHelpText.UseRichEdit:= True; rtfHelpText.RTFText:= s; 结束 procedure InitializeWizard(); begin CreateCustomPages(); 结束 Anyone saw GOG.com game installer? How to make welcome text string like there including Path and Need Size in a single Caption? Where part of is bolded.Here are examples of how changes String line breaking after modifying install path 解决方案 You can use a TRichEditViewer setting the RFTText property and the UseRichEdit to True.Try this sampleprocedure CreateCustomPages;var Page : TWizardPage; rtfHelpText : TRichEditViewer; s: string;begin Page := CreateCustomPage(wpWelcome, 'Custom wizard page controls', 'Bold Demo'); Page.Surface.Align:=alCLient; s:='{\rtf1\ansi\ansicpg1252\deff0\deflang13322{\fonttbl{\f0\fnil\fcharset0 Tahoma;}}'+ '\viewkind4\uc1\pard\f0\fs16 This is a normal text, \b and this is a bold text\b0\par}'; rtfHelpText := TRichEditViewer.Create(Page); rtfHelpText.Parent := Page.Surface; rtfHelpText.Left := 0; rtfHelpText.Top := 0; rtfHelpText.Width := Page.SurfaceWidth; rtfHelpText.Height := Page.SurfaceHeight; rtfHelpText.Scrollbars := ssVertical; rtfHelpText.ReadOnly := True; rtfHelpText.UseRichEdit := True; rtfHelpText.RTFText := s;end;procedure InitializeWizard();begin CreateCustomPages();end; 这篇关于使用Inno Setup中格式化(部分粗体)的文本制作安装程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-27 14:01