DelphiDelphiVCLPythonPython GUIWindows

How to use the State Property

man sitting cozy while working on his laptop

State property is used as an indicator for which items are selected or checked.

For example, for each member of the Items array, we use State to determine whether the checkbox is selected (cbChecked), cleared (cbUnchecked), or dimmed (cbGrayed). 

Note: cbGrayed corresponds to the indeterminate state.

State combines the information provided by the Boolean Checked property and the Boolean ItemEnabled property:

  • When Checked is True, State is cbChecked. However, when Checked is False, State may be either cbUnchecked or cbGrayed.
  • When State is cbGrayed, ItemEnabled is False. However, ItemEnabled may also be False when State is cbUnchecked or cbChecked.)

Another example of a State use case is in Draw Grid creation. State will show us the selected cell in the created grid or table. 

Here is the working example of the implementation of State in Draw Grid creation:

See the complete code here.

The result:

2 4199814
3 6313460

 

Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.

Related posts
AndroidCodeDelphiLearn PythonProjectsPythonPython GUI

How to Create a BMI App With Delphi Ecosystem And Python

AndroidCodeDelphiDelphiFMXLearn PythonProjectsPythonPython GUI

How to Create a Stopwatch/Timer Android App With Delphi For Python?

AndroidCodeDelphiDelphiFMXLearn PythonProjectsPythonPython GUI

How to Create a Unit Converter Android App Using Python GUI

AndroidDelphiDelphiFMXLearn PythonPythonPython GUI

How To Create A Python Quiz Application With DelphiFMX?

Leave a Reply

Your email address will not be published. Required fields are marked *