ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Other ways to manage menu options
  • Using functions or properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The Checked property gets and sets the checkmark state of an element.
This property can be used:
  • in the options of the main menus and context menus. In this case, you can know whether the checkmark is displayed to the left of the option.
  • WINDEV on the rows of TreeView controls. In this case, you can determine whether the checkmark is displayed, hidden or in an undefined state.
Example
// Click on the "Display totals" option
IF OPT_DisplayOption.Checked THEN
OPT_DisplayOption.Checked = False
STC_TOTAL.Visible = False
ELSE
OPT_DisplayOption.Checked = True
STC_TOTAL.Visible = True
END
Syntax

Getting the checkmark state of an element Hide the details

<Result> = <Element to handle>.Checked
<Result>: Boolean or integer
  • For a menu option:
    • True if the menu option is checked,
    • False otherwise.
  • WINDEV For a row in a TreeView control:
    • 1 if the option is checked
    • 0 if the option is unchecked
    • -1 if the option state is undefined.
<Element to handle>: Character string
Name of the element to be used:
  • Name of the menu option.
  • WINDEV Row of the TreeView control specified with the following syntax: <TreeView control>[Row index].

Changing the checkmark state of an element Hide the details

<Element to handle>.Checked = <Displayed>
<Element to handle>: Character string
Name of the element to be used:
  • Name of the menu option.
  • WINDEV Row of the TreeView control specified with the following syntax: <TreeView control>[Row index].
<Displayed>: Boolean or integer
  • For a menu option:
    • True if the menu option is checked,
    • False otherwise.
  • WINDEV For a row in a TreeView control :
    • 1 if the option is checked
    • 0 if the option is unchecked
    • -1 if the option state is undefined.
Remarks

Other ways to manage menu options

The Checked property is equivalent to the following functions:
WINDEVWindows

Using functions or properties

Menu options (main menus and context menus) can be manipulated using the Menuxxx functions and the corresponding properties.
See the table below:
Available functionsEquivalent properties
MenuUnmark
MenuIsMarked
MenuMark
Checked
MenuStateState
MenuInvisibleVisible
MenuSelectMinusState
MenuSelectPlusState
MenuLabelCaption
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/11/2023

Send a report | Local help