[Gambas-user] More null problems
Bruce
bbruen at ...2090...
Mon Apr 20 07:59:26 CEST 2009
I have a set of two radio buttons in a panel control (Male & Female), when a
new person object is loaded into the form I need to set the gender
appropriately. However, some persons' gender is not known, say for "Brown,
J" and I am trying unsuccessfully to set both radio buttons to reflect this.
IF p.gender = "M" THEN
rbMale.Value = TRUE
rbFemale.Value = FALSE
ELSE IF p.gender = "F" THEN
rbMale.Value = FALSE
rbFemale.Value = TRUE 'OK So far, but...
ELSE
rbMale.Value = FALSE
rbFemale.Value = FALSE
ENDIF
In the unknowns case, the radiobuttons are always left in the state they were
in on the previous object. So, if I go from Brown, Hillary (F) to Brown, J
the value is left as for Hillary. But if I go from Brown, Kevin (M) to
Brown, J its left as for Kevin.
I've also tried setting both rb Values to NULL but this gives the same result.
Any clues?
tia
Bruce
More information about the User
mailing list