Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use my optionbutton with optiongroup
Message
From
07/12/2006 01:14:49
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
06/12/2006 12:10:22
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01174874
Message ID:
01175497
Views:
8
Hi Dragan,
>There's a way around it, but it's in code. With any container class which accepts members of only one base class (grid, pageframe, optiongrup, commandgroup - are there any others?), you can start with ...count=0, and then add objects of that base class as you like, programmatically, in the container's .init():
>
>
this.newobject("opBlue", "myOpButton", "myCtls.vcx")
>with this.opBlue
>...
>endwith
Thats mainly what I do - with grids, the only place I need it. But this is not realy the use of MEMEBER*.

>The trouble with this approach is that you don't see these objects in design time, and their positioning is something you need to calculate. Which is a non-issue for grids and pageframes - the positioning is automatic, you only need to care of their order of appearance - and isn't too hard for optiongroups either. If it's vertical, you just set .left=0 and .top=(nIndex-1)*(.height+2), where nIndex is the button's ordinal number. If horizontal, .top=0 and you need to accumulate the widths.

For the grids I've a method that receive a Array and build up the columns from it. This runs with all the column properties I need. This is from the days where HIGHLIGHTSTYLE was unknown and the "highlighted" row was done with DYNAMIC*COLOR.

>I generally stay away from commandgroups :)

I remeber the existence of such a class. Never figured out what it is good for.

Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform