Sign in Join

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

Mailing lists / lazarus / 2003-03

RadioGroup problem

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Mattias Gaertner
to Tony Maro: I'm attempting to programmatically set the state of a radio group that has two buttons. I…
Show quoted text 25 lines
I'm attempting to programmatically set the state of a radio group that has two buttons. I create the form (not shown), then set the form.radiogroup.itemindex property. The first time I use this modal form it works fine, but if I close the form, change the setting, and attempt to reopen it, the form will always show the original setting. For instance... Set the ItemIndex to 1 Display form It displays 1 as pushed. Close the form without changing it. Set the ItemIndex to 0 Display form It displays 1 as pushed (still) until app is completely closed and reopened, or until the user clicks a radio button at which time it will decide THAT is the new always setting. The reverse holds true... Set it to zero, display, close, change to 1, display and zero still shows checked. Amy ideas would be appreciated.

Fixed.

Mattias

Show quoted text 13 lines
-- Tony Maro http://tony.maro.net/ Check out my software "CheckBook Tracker" A GPL (free) replacement for Microsoft Money! _________________________________________________________________ To unsubscribe: mail with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives

Reply by email

Tony Maro

I'm attempting to programmatically set the state of a radio group that has two buttons.

I create the form (not shown), then set the form.radiogroup.itemindex property. The first time I use this modal form it works fine, but if I close the form, change the setting, and attempt to reopen it, the form will always show the original setting.

For instance...

Set the ItemIndex to 1
Display form
It displays 1 as pushed.
Close the form without changing it.
Set the ItemIndex to 0
Display form
It displays 1 as pushed (still) until app is completely closed and reopened, or until the user clicks a radio button at which time it will decide THAT is the new always setting.

The reverse holds true...
Set it to zero, display, close, change to 1, display and zero still shows checked.

Amy ideas would be appreciated.

Tony Maro http://tony.maro.net/ Check out my software "CheckBook Tracker" A GPL (free) replacement for Microsoft Money!

Reply by email