Recent

Author Topic: TRadioButton problem?  (Read 8070 times)

KEagles

  • Newbie
  • Posts: 3
TRadioButton problem?
« on: October 02, 2006, 08:04:33 am »
Hi,
I just finished the 0.9 version of a little opensource program that I made. The only thing getting it from 1.0 is that I can't create grouped radio buttons, you know? If I remember well, in Delphi I just need to set the GroupIndex to an unique number thru the group, and all goes well.
But I can't find this property in Lazarus.
It isn't implemented? Or what?
All my radio buttons works like one big group.

Thanks in advance,
Vítor Baptista.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2674
RE: TRadioButton problem?
« Reply #1 on: October 02, 2006, 11:21:25 am »
I wonder how it is suppoesed to work in delphi. In my delphi (D6) there is no such thing as GroupIndex.
IIRC radiobuttons are grouped by a groupbox.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

CCRDude

  • Hero Member
  • *****
  • Posts: 615
RE: TRadioButton problem?
« Reply #2 on: October 02, 2006, 12:16:44 pm »
It works quite simple - everything having the same GroupIndex is in the same group.
:D

But actually I didn't find it in BDS 4 / Delphi 2006 either. Maybe it was a Visual Basic property I remember from before Delphi was available even? Must've been nearly a dozen years then ;)

KEagles

  • Newbie
  • Posts: 3
TRadioButton problem?
« Reply #3 on: October 02, 2006, 11:14:59 pm »
This is how it works here in Delphi 7.
Btw in Lazarus I am supposed to create GroupBoxes for each group?

Also, is there any way that I could create a GroupBox that has no border?
I want it to be completely invisible.

CCRDude

  • Hero Member
  • *****
  • Posts: 615
TRadioButton problem?
« Reply #4 on: October 03, 2006, 01:25:08 pm »
@KEagles: I don't see it in Delphi 10:
(http://img175.imageshack.us/img175/6782/mozscreenshot1lv9.th.jpg)

No idea if this really needs a groupbox, have you tried a TPanel without borders?

KEagles

  • Newbie
  • Posts: 3
TRadioButton problem?
« Reply #5 on: October 04, 2006, 11:11:31 am »
Yes, TPanels work too.
I just made it.

There's one last thing that I need:
The RadioButtons can't be required.

Like, I MUST have one radiobutton checked, by default.
I need that I can have no radiobutton checked at all.

Does someone knows how to do that?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2674
TRadioButton problem?
« Reply #6 on: October 04, 2006, 11:21:29 am »
afaik, having one selected is the standard behaviour of a radio group. What you can do is add one for selecting "none of the above"
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018