You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Menu Item - RadioItem Property
RadioItem makes the menu item a radio button
Member of Menu Item (PRIM_MITM)
Data Type - Boolean

Details


The RadioItem property will make the menu item appear like a radio button
Use the GroupIndex and Checked properties to define a set of mutually exclusive menu options.

Example


In this example, whenever a menu item is clicked, its Checked property is set to True.
As all 4 menu items belong to the same group, all other menu items are set to False.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(897) Clientheight(384) Componentversion(2) Top(227) Left(222) Menubar(#MenuBar1)
Define_Com Class(#PRIM_MBAR) Name(#MenuBar1) Parent(#COM_OWNER)
Define_Com Class(#PRIM_MITM) Name(#MenuItem1) Caption('Item1') Displayposition(1) Parent(#MenuBar1)
Define_Com Class(#PRIM_SMNU) Name(#SubMenu1) Parent(#MenuItem1)
Define_Com Class(#PRIM_MITM) Name(#MenuItem2) Displayposition(1) Parent(#SubMenu1) Caption('Item') Groupindex(1) Radioitem(True)
Define_Com Class(#PRIM_MITM) Name(#MenuItem3) Displayposition(2) Parent(#SubMenu1) Caption('Item') Groupindex(1) Radioitem(True)
Define_Com Class(#PRIM_MITM) Name(#MenuItem4) Displayposition(3) Parent(#SubMenu1) Caption('Item') Groupindex(1) Radioitem(True)
Define_Com Class(#PRIM_MITM) Name(#MenuItem5) Displayposition(4) Parent(#SubMenu1) Caption('Item') Groupindex(1) Radioitem(True)
Evtroutine Handling(#MenuItem2.click #MenuItem3.click #MenuItem4.click #MenuItem5.click) Com_Sender(#Sender)
#Sender.Checked := true
Endroutine
End_Com

See also

All Component Classes
Technical Reference

  • No labels