★如何将字符串转换为Tcolor类型,比如我读取文本中的green,red等,如何将它赋值给label的color属性?(50分)

  • 主题发起人 volcanosh
  • 开始时间
V

volcanosh

Unregistered / Unconfirmed
GUEST, unregistred user!
★如何将字符串转换为Tcolor类型,比如我读取文本中的green,red等,如何将它赋值给label的color属性?
 
if trim(edit1.Text) ='green' then
label1.Font.Color :=clgreen
else if trim(edit1.Text )='red' then
label1.Font.Color :=clred;
 
能不能存三个整数?然后用RGB函数得到实际的颜色.
 
多人接受答案了。
 

Similar threads

S
回复
0
查看
958
SUNSTONE的Delphi笔记
S
S
回复
0
查看
779
SUNSTONE的Delphi笔记
S
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
顶部