Re: [Gambas-user] re-setting several radiobuttons to false ?how

2009-08-05 Thread Ron_1st
On Wednesday 05 August 2009, Charlie Reinl wrote:
 Am Mittwoch, den 05.08.2009, 17:48 +1000 schrieb richard terry:
  If one has say 3 radiobuttons in a container
  is there anyway to set them all back to false ?
  
  If I try this code to clear some textboxes, checkboxes and radiobuttons 
  contained within a hbox, the tetboxes clear and checkboxes clear, but not 
  the 
  radiobuttons:
   
Dim hCtrl As Control
Dim hb As HBox
Dim tb As TextBox
Dim cb As CheckBox
Dim rb As RadioButton
  
   For Each hctrl In Vbox1.children
   If hctrl Is hbox Then
  hb = hctrl
 For Each hCtrl In HB.Children
   If hctrl Is textbox Then
  tb = hctrl
  tb.Clear()
   Else If hctrl Is RadioButton Then
  rb = hctrl 
  rb.value = False   
   Else If hctrl Is checkbox Then
cb = hctrl
   cb.value = False  
  End If
 Next  
   End If
Next
  
  If I directly address the radiobutton in the group by name, it still dosn't 
  clear.
  
  any help appreciated.
  
  Richard
 
 Salut Richard,
 
 https://secure.wikimedia.org/wikipedia/en/wiki/Radiobutton
 
 The Apple Human Interface Guidelines specify that one item of a radio
 button group must always be selected.
 
 Charlie
 

You can add a forth radio button in the group and set it hidden.
By setting this 4'th to true the others go false.
More correct is to set the 4'th not hidden but label it as 'None of the others'

Not only the 'Apple Human Interface Guidelines' but many other say the same.
Only on web pages the _browser_ (specific IE) does allow none is true.
In fact it is the fault of the web page developer to not set one to true.


Best regards,

Ron_1st

 ---

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] re-setting several radiobuttons to false ?how

2009-08-05 Thread richard terry
On Wed, 5 Aug 2009 08:04:16 pm Stefano Palmeri wrote:
 Il mercoledì 5 agosto 2009 11:16:32 Charlie Reinl ha scritto:
  Am Mittwoch, den 05.08.2009, 17:48 +1000 schrieb richard terry:
   If one has say 3 radiobuttons in a container
   is there anyway to set them all back to false ?
  
   If I try this code to clear some textboxes, checkboxes and radiobuttons
   contained within a hbox, the tetboxes clear and checkboxes clear, but
   not the radiobuttons:
  
 Dim hCtrl As Control
 Dim hb As HBox
 Dim tb As TextBox
 Dim cb As CheckBox
 Dim rb As RadioButton
  
For Each hctrl In Vbox1.children
If hctrl Is hbox Then
   hb = hctrl
  For Each hCtrl In HB.Children
If hctrl Is textbox Then
   tb = hctrl
   tb.Clear()
Else If hctrl Is RadioButton Then
   rb = hctrl
   rb.value = False
Else If hctrl Is checkbox Then
 cb = hctrl
cb.value = False
   End If
  Next
End If
 Next
  
   If I directly address the radiobutton in the group by name, it still
   dosn't clear.
  
   any help appreciated.
  
   Richard
 
  Salut Richard,
 
  https://secure.wikimedia.org/wikipedia/en/wiki/Radiobutton
 
  The Apple Human Interface Guidelines specify that one item of a radio
  button group must always be selected.
 
  Charlie

 Some time ago we talked about it. If you wanna clear all radiobuttons
 there's an easy workaround. Add a radiobutton (say HiddenRadioButton)  in
 the group and set its Visible property FALSE.

 So when you want to clear radiobuttons, just select the hidden radiobutton,
 HiddenRadioButton.Value = TRUE and all others in the group will be cleared.

 Ciao,

 Stefano

  -
 -- --- Let Crystal Reports handle the reporting - Free Crystal Reports
  2008 30-Day trial. Simplify your report design, integration and
  deployment - and focus on what you do best, core application coding.
  Discover what's new with Crystal Reports now. 
  http://p.sf.net/sfu/bobj-july
  ___
  Gambas-user mailing list
  Gambas-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/gambas-user

 ---
--- Let Crystal Reports handle the reporting - Free Crystal Reports 2008
 30-Day trial. Simplify your report design, integration and deployment - and
 focus on what you do best, core application coding. Discover what's new
 with Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

Good solution.

thanks

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user