2012-01-30 9 views
5

誰かがGOG.comゲームインストーラを見た?単一のキャプションにPathやNeed Sizeなどのようなウェルカムテキスト文字列を作成するにはどうすればいいですか?太字の部分。ここでInno Setupでフォーマットされたテキスト(部分太字)のインストーラを作成しますか?

は、文字列の改行はパス

http://i.stack.imgur.com/VKbtE.jpg

enter image description here

enter image description here

+1

を試してみてください。いずれかのいくつかの 'TLabel'コントロールを使用するか、他のコントロールを使用します(GDIを使用してテキストを手動で描画することもできます)。 –

+0

RICHEDITコントロールやHTMLレンダラーのようです。 –

+0

あなたが正しいものを手に入れたら['accept answers'](http://meta.stackexchange.com/a/5235/179541)を忘れないでください – TLama

答えて

17

をインストール変更した後、あなたがTrueにRFTTextプロパティを設定TRichEditViewerUseRichEditを使用することができますどのように変化するかの例です。

は `TLabel`、フォーマットを持つことができないこのサンプル

procedure 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; 

enter image description here

+0

おそらくOPはその豊富な編集でBorderStyle = noneを望んでいるでしょう彼らはinnoでそれをすることができますか? –

+2

@WarrenP:はい、問題ありません( 'rtfHelpText.BorderStyle:= bsNone')。 OPはおそらく 'rtfHelpText.Color:= clBtnFace'も望んでいます。 (IMHO、国境はありませんが、clWindowの背景は恐ろしいですね) –

+0

RTFViewerについて知っていますが、それは正確には私が意味するものではありません。正しくインストールするパスを表示できず、可能であれば、 C:\ Program Files \のように部分的に2行目に改行されます。しかし、上のexammple上に、パスが完全に2行目になる場合は、行に収まらない – Gocha

関連する問題