读书人

高手

发布时间: 2012-02-20 21:18:25 作者: rapoo

求助: 求助高手
Label1-> Font-> Style = TFontStyles() < < fsBold < < fsItalic;   粗斜体
Label1-> Font-> Style = TFontStyles() < < fsItalic;   ・・斜体
Label1-> Font-> Style = TFontStyles() < < fsBold ;  粗体
那正常体怎么写的
这样写 Label1-> Font-> Style = TFontStyles() ? 貌似不行啊


[解决办法]
帮助里找到的
This example sets a Label 's Font Style to fsBold and fsUnderline.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Label1-> Font-> Style = TFontStyles() < < fsBold < < fsUnderline;
}
procedure Form1.Button1Click(Sender: TObject);
begin
Label1.Font.Style := [fsBold,fsUnderline];
end;

This example demonstrates how to clear any Styles that were previously set.

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Label1-> Font-> Style = TFontStyles();
}

读书人网 >C++ Builder

热点推荐