Lyle Johnson
1/12/2009 3:47:00 PM
On Sat, Jan 10, 2009 at 2:51 PM, Li Chen <chen_li3@yahoo.com> wrote:
> I use FXRuby to create 5 radio buttons and tie them to FXDataTarget.
> When I run the codes a defautl button is always selected. Is it
> possible to disable this feature so that no button is chosen at the
> first run?
Sure, just initialize the FXDataTarget to some value that doesn't
correspond to *any* of the radio buttons, e.g.
data_target = FXDataTarget.new(-1)
FXRadioButton.new(..., :target => data_target, :selector =>
FXDataTarget::ID_OPTION+0, ...)
FXRadioButton.new(..., :target => data_target, :selector =>
FXDataTarget::ID_OPTION+1, ...)
FXRadioButton.new(..., :target => data_target, :selector =>
FXDataTarget::ID_OPTION+2, ...)
FXRadioButton.new(..., :target => data_target, :selector =>
FXDataTarget::ID_OPTION+3, ...)
FXRadioButton.new(..., :target => data_target, :selector =>
FXDataTarget::ID_OPTION+4, ...)
Hope this helps,
Lyle