i want to get the text in TNewStaticText bold . is there any method available in inno setup
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
The bold text you can have if you include the fsBold
style to the Font.Style
property of your static text control, for instance:
[Code]
procedure InitializeWizard;
var
StaticText: TNewStaticText;
begin
StaticText := TNewStaticText.Create(WizardForm);
StaticText.Parent := WizardForm;
StaticText.Left := 0;
StaticText.Top := WizardForm.NextButton.Top;
StaticText.Font.Style := [fsBold];
StaticText.Caption := 'This is a bold text';
end;
Just out of curiosity, there are also other font styles that you can include to the Font.Style
property. Here is the list of all the available styles:
- fsBold - the font is boldfaced
- fsItalic - the font is italicized
- fsUnderline - the font is underlined
- fsStrikeOut - the font is displayed with a horizontal line through it
These styles you can combine however you want, so for instance to make a bold underlined text control, you can set your Font.Style
property this way:
StaticText.Font.Style := [fsBold, fsUnderline];
标签:
inno-setup