◇◆◆◆◇ListView中如何使特定的某一行的字体变为“粗体”? 在OnDrawitem中自己画,这应该是唯一的处理方法。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 提供一个C++Builder的方法 void __fastcall TForm1::ListView1CustomDrawItem(TCustomListView *Sender, TListItem *Item, TCustomDrawState State, bool &DefaultDraw){ if ( Item->Index == 0 ) { ListView1->Canvas->Font->Color = clRed; ListView1->Canvas->Font->Style = TFontStyles()<< fsBold; ListView1->Canvas->Font->Size = 12; ListView1->Canvas->Font->Name = "宋体"; } if ( Item->Index == 1 ) { ListView1->Canvas->Font->Color = clGreen; ListView1->Canvas->Font->Style = TFontStyles() << fsUnderline; ListView1->Canvas->Font->Size = 10; ListView1->Canvas->Font->Name = "黑体"; }}或者//-----------------------------------------------------void __fastcall TForm1::ListView1CustomDrawItem(TCustomListView *Sender, TListItem *Item, TCustomDrawState State, bool &DefaultDraw){if ( Item->Index == x )//x 为行数 { Sender->Canvas->Font->Style=Sender->Canvas->Font->Style<<fsBold; }} as3 delphi向flash发送数据问题 关于:查询数据库,长时间等待时的动态提示 3322动态域名更新服务,net stop 不能停止服务 窗口融合,谢谢 如何在自定义函数里用控件? 创建进程内COM对象,注册COM DLL的问题.我无法注册 DELPHI小问题 再问一个 简单的AT命令问题. 100分求助~~~~ Word((@Text)^) := SizeOf(Text);是什么意思呢?请指教!! 急用!高手来啊! 怎样用汉字来起工程名字的??最小化窗口的时候,窗口标题都是英文的,很不顺眼。
TListItem *Item, TCustomDrawState State, bool &DefaultDraw)
{
if ( Item->Index == 0 )
{
ListView1->Canvas->Font->Color = clRed;
ListView1->Canvas->Font->Style = TFontStyles()<< fsBold;
ListView1->Canvas->Font->Size = 12;
ListView1->Canvas->Font->Name = "宋体"; }
if ( Item->Index == 1 )
{
ListView1->Canvas->Font->Color = clGreen;
ListView1->Canvas->Font->Style = TFontStyles() << fsUnderline;
ListView1->Canvas->Font->Size = 10;
ListView1->Canvas->Font->Name = "黑体";
}
}或者//-----------------------------------------------------
void __fastcall TForm1::ListView1CustomDrawItem(TCustomListView *Sender, TListItem *Item, TCustomDrawState State, bool &DefaultDraw)
{
if ( Item->Index == x )//x 为行数
{
Sender->Canvas->Font->Style=Sender->Canvas->Font->Style<<fsBold;
}
}