2012-01-30 1 views
5

누구나 GOG.com 게임 설치 프로그램을 보았습니까? 어떻게 하나의 캡션에 경로와 필요 크기를 포함하여 환영 텍스트 문자열을 만들 수 있습니까? 일부는 굵게 표시됩니다.Inno Setup에서 포맷 된 텍스트 (부분적으로 굵은 글씨)로 설치 프로그램을 만드시겠습니까?

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

enter image description here

enter image description here

+1

앞에'TLabel'이 가질 수 없습니다 형식을보십시오. 당신은 여러 개의 'TLabel'컨트롤을 사용하거나 다른 컨트롤을 사용합니다 (또는 GDI를 사용하여 수동으로 텍스트를 그릴 수 있습니다). –

+0

RICHEDIT 컨트롤이나 HTML 렌더러처럼 보입니다. –

+0

올바른 대답을 얻을 때 ['accept answers'] (http://meta.stackexchange.com/a/5235/179541)를 잊지 마시길 바랍니다. – TLama

답변

17

당신은 RFTText 속성을 설정 TRichEditViewer을 사용할 수 있습니다 설치 경로 수정 한 후 문자열 줄 바꿈을 변경하고 True로 UseRichEdit 방법

는 다음의 예 .

이 샘플

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 \와 같이 부분적으로 줄 바꿈이 두 번째 줄로 나옵니다. 하지만 맨 위에 표시된 exammple 에선 두번째 라인으로 넘어갈 때 라인이 완전히 맞지 않을 것입니다. – Gocha

관련 문제