[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Hide TRadioGroup or TGroupBox frame?

Posted on 2004-09-29
6
Medium Priority
?
2,446 Views
Last Modified: 2008-03-10
I am trying to group TRadioButtons together, but I do not want a frame/border around the groupings.

IOW, imagine 4 TRadioButtons on a form.  Of these 4, 2 belong to one group, and the remaining 2 belong to a second group.  But I do  not want borders/frames/bevels around any of the groupings.

Both the TRadioGroup and TGroupBox components have no way to turn off the border/frame/bevel.

I am using Delphi 3.

Any suggestions?
0
Comment
Question by:Monroe406
[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
  • 4
  • 2
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 12180951
? just drop your radios on a form

for two set an equal groupindex (1 for example)
for the other two set another equal groupindex (2 for example)

thats all, just from head

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 12181053
hmm sorry, a radio has no groupindex, so forget my comment
0
 
LVL 7

Expert Comment

by:LRHGuy
ID: 12181065
Like kretzschmar said, you can drop a panel on the form and add the radio butons to it.

Or

You can derive your own radio button group and override the paint method:

type
  tRBG=class(tRadioGroup)
  protected
    procedure Paint; Override;
  end;

procedure tRBG.Paint;
var
  R: TRect;
begin
  with Canvas do begin
    R := ClientRect;
    Brush.Color := Color;
    FillRect(R);
  end;
end;

You can either add the new component to a package, or just add it to the form at run time:

procedure TForm2.FormCreate(Sender: TObject);
begin
  with tRBG.Create(self) do begin
    Parent:=Self;
    Left:=10;
    Top:=40;
    Width:=200;
    Height:=100;
    Items.Add('One');
    Items.Add('Two');
  end;
end;
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 27

Accepted Solution

by:
kretzschmar earned 200 total points
ID: 12181085
well, this should work,

drop two panels as container (bevels can adjusted there)
in each panel drop two radios

meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 12181112
??

>Like kretzschmar said, you can drop a panel on the form and add the radio butons to it.

are you telepathic, LRHGuy?

0
 
LVL 7

Expert Comment

by:LRHGuy
ID: 12181524
Telepathic? It might be a talent I didn't know I had!

I figured panels would work and figured that's what you meant.
0

Featured Post

Independent Software Vendors: 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

656 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