Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option Group 1

Status
Not open for further replies.

MaryG

Programmer
Mar 26, 2001
26
AU
I am new to FoxPro and can't see how I would do this.Any ideas would be appreciated.

Is it possible to create an Option Group dynamically from a free table? I want each option in the Option Group to be generated from the values stored in a lookup table. I don't want to 'hard code' the values for each option.

ie the same way you can specify a table for a dropdown combo to be generated from.

Thanks
Mary
 
Hi!

Look to the help for OptionGroup control, Buttons and ButtonsCount properties. There are nice samples. After setting buttonscount to required number of options, set each button caption property in the loop using buttons array, for example:

thisform.opgDynaOptions.ButtonsCount=reccount()
i=1
scan
thisform.opgDynaOptions.buttons(i).Caption = SomeField
i=i+1
endscan


Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Mary,

I just wanted to add that you'll need to set the option group's Autosize property to true, otherwise you might not see all the buttons.

Stewart
 
Thanks Tomas & Stewart.
My option group is all working now.

Mary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top