lizzzard
asked on
Colored boxes in RadioGroup
Hi,
I have a radiogroup in which my users must be able to select a combination of three colors. They can choose out of 6 combinations. (RGB,GBR,BGR,RBG,GRB,BRG). I want each option to show up as a row of three little squares,each in 1 color.
What is the best way to do this? I can make 6 little bitmaps and show them in the radiogroup or maybe paint them on a canvas or something. Any suggestions?
Thanks.
I have a radiogroup in which my users must be able to select a combination of three colors. They can choose out of 6 combinations. (RGB,GBR,BGR,RBG,GRB,BRG).
What is the best way to do this? I can make 6 little bitmaps and show them in the radiogroup or maybe paint them on a canvas or something. Any suggestions?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Here is small example
object Form1: TForm1
Left = 200
Top = 108
Width = 167
Height = 128
Caption = 'Form1'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
PixelsPerInch = 96
TextHeight = 13
object ColorGroup: TGroupBox
Left = 8
Top = 8
Width = 137
Height = 81
Caption = 'ColorGroup'
TabOrder = 0
object Shape1: TShape
Left = 64
Top = 24
Width = 17
Height = 17
Brush.Color = clRed
end
object Shape2: TShape
Left = 80
Top = 24
Width = 17
Height = 17
Brush.Color = clGreen
end
object Shape3: TShape
Left = 96
Top = 24
Width = 17
Height = 17
Brush.Color = clBlue
end
object Shape8: TShape
Left = 96
Top = 48
Width = 17
Height = 17
Brush.Color = clRed
end
object Shape9: TShape
Left = 64
Top = 48
Width = 17
Height = 17
Brush.Color = clGreen
end
object Shape14: TShape
Left = 80
Top = 48
Width = 17
Height = 17
Brush.Color = clBlue
end
object RGBBtn: TRadioButton
Left = 8
Top = 24
Width = 50
Height = 17
Caption = 'RGB'
TabOrder = 0
end
object GBRBtn: TRadioButton
Left = 8
Top = 48
Width = 50
Height = 17
Caption = 'GBR'
TabOrder = 1
end
end
end