Partager via


Member Classes Sample

File: ...\Samples\Solution\Toledo\frmMember.scx

You can specify member classes for the following container classes:

  • PageFrame (Page member class)

  • OptionGroup (OptionButton member class)

  • CommandGroup (CommandButton member class)

  • Grid (Column member class)

  • Column (Header member class)

You can also create subclasses of the Page, OptionButton, CommandButton, Column, and Header classes.

In this sample, you can select a parent container, set the member class library, increase or decrease the member count, and choose to view behavior at design time or run time.

Note

Observe the differences in behavior that exist during design time and run time. Changes to MemberClass affect all member classes at design time. Only new members are affected at run time.

This sample uses program (.prg)-based and visual class library (.vcx)-based member classes. For more information, see Member Classes.

Specifying a Member Class and Member Class Library

You can specify the member class and its member class library you want to use for the PageFrame, OptionGroup, CommandGroup, Grid, and Column containers by setting the MemberClass and MemberClassLibrary properties for those objects as shown in the following code:

MemberClassLibrary = "MyClasses.vcx"
MemberClass = "MyClassName"

-or-

MemberClassLibrary = "MyClasses.prg"
MemberClass = "MyClassName"

You must set MemberClassLibrary before setting the MemberClass property.

For more information, see MemberClass Property, and MemberClassLibrary Property.

See Also

Other Resources

Programming Solution Samples