Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Colored boxes in RadioGroup

Posted on 1998-06-22
2
Medium Priority
?
262 Views
Last Modified: 2010-04-04
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.
0
Comment
Question by:lizzzard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
vladika earned 300 total points
ID: 1355224
Use Shape and set Brush and Pen properties as you want.


0
 
LVL 3

Expert Comment

by:vladika
ID: 1355225
Use TGroupBox and TRadioButtons instead of TRadioGroup
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
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

661 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question