Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This example shows a simple menu bar with 3 options and 3 items per option.

...

     Function Options(*DIRECT)
     Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(454) Clientheight(248) Componentversion(2) Top(227) Left(199) Menubar(#MenuBar1)
 
        Define_Com Class(#PRIM_MBAR) Name(#MenuBar1) Parent(#COM_OWNER)
        Define_Com Class(#PRIM_MITM) Name(#MenuItem1) Displayposition(1) Parent(#MenuBar1) Caption('Option 1')
        Define_Com Class(#PRIM_SMNU) Name(#SubMenu1) Parent(#MenuItem1)
        Define_Com Class(#PRIM_MITM) Name(#MenuItem2) Displayposition(1) Parent(#SubMenu1) Caption('Item 1')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem3) Displayposition(2) Parent(#SubMenu1) Caption('Item 2')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem4) Displayposition(3) Parent(#SubMenu1) Caption('Item 3')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem5) Displayposition(2) Parent(#MenuBar1) Caption('Option 2')
        Define_Com Class(#PRIM_SMNU) Name(#SubMenu2) Parent(#MenuItem5)
        Define_Com Class(#PRIM_MITM) Name(#MenuItem6) Displayposition(1) Parent(#SubMenu2) Caption('Item 1')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem7) Displayposition(2) Parent(#SubMenu2) Caption('Item 2')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem8) Displayposition(3) Parent(#SubMenu2) Caption('Item 3')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem9) Displayposition(3) Parent(#MenuBar1) Caption('Option 3')
        Define_Com Class(#PRIM_SMNU) Name(#SubMenu3) Parent(#MenuItem9)
        Define_Com Class(#PRIM_MITM) Name(#MenuItem10) Displayposition(1) Parent(#SubMenu3) Caption('Item 1')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem11) Displayposition(2) Parent(#SubMenu3) Caption('Item 2')
        Define_Com Class(#PRIM_MITM) Name(#MenuItem12) Displayposition(3) Parent(#SubMenu3) Caption('Item 3')

...

End_Com

 PropertiesProperties

Name

Description

ComponentClassName

ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT)

ComponentMembers

ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT)

ComponentPatternName

ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT)

ComponentTag

Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT)

ComponentType

ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT)

ComponentTypeName

ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT)

Items

Collection of items in the component Inherited from Base Menu (PRIM_MENU)

Name

Name identifies the component Inherited from Object (PRIM_OBJT)

Owner

Owner owns this component Inherited from Object (PRIM_OBJT)

Parent

The component instance to which this instance is attached. The visual container for a control or the collector of a set of child instances

TipShow

TipShow controls whether menu item tips are shown. Inherited from Base Menu (PRIM_MENU)

...

See also

All Component Classes

Technical Reference