Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-10

Bugreport 0012403

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bogusław Brandys

Hi,

bugreport http://bugs.freepascal.org/view.php?id=12403

In radiogroup.inc there is a method called procedure
TCustomRadioGroup.UpdateItems;

inside is created strange FHiddenButton of class TRadioButton. It of course adds to the list of controls of TRadioGroup even if it's hidden for use usage. I don't know what it is, presumably some hack.

Please explain what is the purpose of this hidden Tradiobutton ?

Regards
Boguslaw

Mattias Gaertner
to Bogusław Brandys
Show quoted text 12 lines
Hi, bugreport http://bugs.freepascal.org/view.php?id=12403 In radiogroup.inc there is a method called procedure TCustomRadioGroup.UpdateItems; inside is created strange FHiddenButton of class TRadioButton. It of course adds to the list of controls of TRadioGroup even if it's hidden for use usage. I don't know what it is, presumably some hack. Please explain what is the purpose of this hidden Tradiobutton ?

The purpose was to support ItemIndex=-1 on gtk1.
You can remove the hidden button, when the gtk intf can live without.

Mattias

Bogusław Brandys
to Mattias Gaertner

Mattias Gaertner pisze:

Show quoted text 21 lines
On Fri, 24 Oct 2008 10:13:09 +0200 Bogus?aw Brandys wrote: > Hi, > > bugreport http://bugs.freepascal.org/view.php?id=12403 > > In radiogroup.inc there is a method called procedure > TCustomRadioGroup.UpdateItems; > > inside is created strange FHiddenButton of class TRadioButton. > It of course adds to the list of controls of TRadioGroup even if it's > hidden for use usage. I don't know what it is, presumably some hack. > > Please explain what is the purpose of this hidden Tradiobutton ? The purpose was to support ItemIndex=-1 on gtk1. You can remove the hidden button, when the gtk intf can live without. Mattias

Does it mean that under gtk1 always one button must be selected ? Is this a limitation of gtk1 ? If so, can you propose a way to create this hidden button only for gtk1 ? Maybe it could be moved to widgetset level (with empty implementations for other platforms) or any simpler solution exists ?

Boguslaw