Difference between revisions of "TColorDialog"
From Lazarus wiki
Jump to navigationJump to search(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{TColorDialog}} | ||
+ | |||
'''TColorDialog''' [[Image:tcolordialog.png]] is a dialog that aids in selecting color from a palette. It can be found on the [[Dialogs tab]] of the [[Component Palette]]. | '''TColorDialog''' [[Image:tcolordialog.png]] is a dialog that aids in selecting color from a palette. It can be found on the [[Dialogs tab]] of the [[Component Palette]]. | ||
[[image:component-TColorDialog.png]] | [[image:component-TColorDialog.png]] | ||
+ | |||
+ | == Example == | ||
+ | |||
+ | <syntaxhighlight lang=pascal> | ||
+ | procedure TForm1.Button1Click(Sender: TObject); | ||
+ | begin | ||
+ | if ColourDialog1.Execute then | ||
+ | Label1.Font.Color := ColourDialog1.Color; | ||
+ | end; | ||
+ | </syntaxhighlight> | ||
== See also == | == See also == |
Latest revision as of 09:39, 2 August 2023
│
Deutsch (de) │
English (en) │
français (fr) │
русский (ru) │
中文(中国大陆) (zh_CN) │
TColorDialog is a dialog that aids in selecting color from a palette. It can be found on the Dialogs tab of the Component Palette.
Example
procedure TForm1.Button1Click(Sender: TObject);
begin
if ColourDialog1.Execute then
Label1.Font.Color := ColourDialog1.Color;
end;
See also