Solved

Colored boxes in RadioGroup

Posted on 1998-06-22
2
257 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
  • 2
2 Comments
 
LVL 3

Accepted Solution

by:
vladika earned 100 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 100
URL for downloading Google Chrome for Win XP 2 152
delphi parse string to params 3 121
Twebbrowser add css to the header 3 24
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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

816 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now