File: ...\Samples\Solution\Menus\Chkmenu.scx
This sample illustrates dynamically disabling menu items and displaying check marks beside specific menu items.
The menu in this sample was created in the Menu Designer and is run when the form is initialized.
В | ![]() |
---|---|
DO chkmenu.mpr |
To disable a menu item, include an expression that evaluates to false (.F.) in the SET SKIP OF command. For example, the following line of code in the InteractiveChange event of a check box issues SET SKIP OF with the inverse of the value of the check box, disabling the menu item when the check box is not selected.
В | ![]() |
---|---|
SET SKIP OF BAR 1 OF checkitems !THIS.Value |
To display a check mark beside a menu item, include an expression that evaluates to true (.T.) after the TO keyword of the SET MARK OF command. For example, the following line of code in the InteractiveChange event of a check box issues the SET MARK OF command with the Value property setting of the check box.
В | ![]() |
---|---|
SET MARK OF BAR 1 OF checkitems TO THIS.Value |