Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 Tags
Subject: RE: Can an Option Group have Number Options?
Thread ID: 365373 Message ID: 365384 # Views: 83 # Ratings: 1
Version: Visual FoxPro 9 Category: Forms
Date: Tuesday, December 25, 2012 5:46:34 PM         
   


> At runtime the options can only have either 1 (=ticked/selected) or 0 value (=unselected); no matter what you assign each of them at design time, the first click of the optiongroup will force that rule.
> So, just make use of the "tag" property to keep your 0 1 2 3 or whatever then manipulate that character number at your will at runtime
>
> David
> ..
> .
>
>
>
>
> > Foxites:
> >
> > I have four Option buttons in an Option Group, and the values of those buttons are 1,2,3,and 4.
> >
> > But I want the Option Group to mirror an Alignment property's settings:
> >
> > 0=Left
> > 1=Right
> > 2=Center
> > 3=Automatic
> >
> > How do I do that?   Can an Option Group represent a different number sequence from its default?
> >
> > What if I want the Option Button to write character values in my table such as "Left", "Right", etc. ?
> >
> > The button control is nice looking.   I'm seeking a way to make it more flexible.
> >
> > Thanks,
> >
> > Dan B.

You can check the number of OptionsButton controls you've added to the OptionGroup with
Thisform.Optiongroup_name.Objects.Count or the Buttons collection
FOR EACH o IN This.Buttons
IF o.Value=1
? o.name

WITH Thisform.OptionGroup1
FOR i = 1 TO .ButtonCount
 IF .Buttons(m.i).Value=1
 ? .Buttons(m.i).Name
 EndIF
NEXT
ENDWITH 


ENTIRE THREAD

Can an Option Group have Number Options? Posted by Dan Baker @ 12/25/2012 2:46:45 PM
RE: Can an Option Group have Number Options? Posted by David Mustakim @ 12/25/2012 4:40:24 PM
RE: Can an Option Group have Number Options? Posted by Anders Altberg @ 12/25/2012 5:46:34 PM
RE: Can an Option Group have Number Options? Posted by Greg Green @ 12/25/2012 6:16:55 PM
RE: Can an Option Group have Number Options? Posted by Dan Baker @ 12/26/2012 2:27:04 PM
RE: Can an Option Group have Number Options? Posted by Stefan Wuebbe @ 12/26/2012 3:24:46 PM
RE: Can an Option Group have Number Options? Posted by Greg Green @ 12/27/2012 8:13:21 PM
RE: Can an Option Group have Number Options? Posted by Dan Baker @ 12/31/2012 4:36:58 PM
RE: Can an Option Group have Number Options? Posted by David Mustakim @ 1/1/2013 7:24:53 PM
RE: Can an Option Group have Number Options? Posted by Rick Hodgin @ 1/1/2013 7:51:35 PM
RE: Can an Option Group have Number Options? Posted by Dan Baker @ 1/1/2013 8:35:31 PM
RE: Can an Option Group have Number Options? Posted by Dan Baker @ 1/1/2013 8:40:39 PM
RE: Can an Option Group have Number Options? Posted by David Mustakim @ 1/1/2013 9:13:40 PM
RE: Can an Option Group have Number Options? Posted by Dan Baker @ 1/2/2013 1:07:38 AM
RE: Can an Option Group have Number Options? Posted by Stefan Wuebbe @ 1/2/2013 9:39:57 AM
RE: Can an Option Group have Number Options? Posted by Dan Baker @ 1/2/2013 12:17:12 PM
RE: Can an Option Group have Number Options? Posted by Stefan Wuebbe @ 1/2/2013 12:22:09 PM
RE: Can an Option Group have Number Options? Posted by Jun Tangunan @ 12/26/2012 12:16:41 AM