[Gambas-user] More null problems

Jeff jeff at ...2103...
Mon Apr 20 15:37:02 CEST 2009


I agree with Stephen's third button option. I don't think check boxes
are right as you can't be both simultaneously (except maybe in some
speciality bars and clubs). Radio buttons are the right way to go. 
You may be able to get the behaviour you're asking for if you delete and
recreate the controls but even if you can do that, once a radio button
selection has been made there's no going back. In that case your gui has
a one way street that isn't user friendly - so better to have that 3rd
state. 
I'm currently working in health. We have 4 states: male, female, unknown
and undisclosed. 

On Mon, 2009-04-20 at 08:27 -0400, Stephen Bungay wrote:
> It is the nature of radio buttons to allow only one in a set to be 
> toggled on, If you really want to go that route then I would suggest 
> that you use checkboxes instead of radio buttons, A better way (IMHO) is 
> to place a third button on the form labelled as "Unknown" and set that 
> one when the gender is a null.
> 
> Bruce wrote:
> > 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
> > 
> > ------------------------------------------------------------------------------
> > Stay on top of everything new and different, both inside and 
> > around Java (TM) technology - register by April 22, and save
> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> > 300 plus technical and hands-on sessions. Register today. 
> > Use priority code J9JMT32. http://p.sf.net/sfu/p
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> > 
> 
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and 
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today. 
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 





More information about the User mailing list