We use the Value property to set or specify any actions or parameters in the DelphiVCL library while using the IDE software.
Here is the working example of Value with CanSelect parameter:
1 2 3 |
def grdTestSelectCell(Sender, Col, Row, CanSelect): if Col == 2 and Row == 2: CanSelect.Value = False |
In the example above, we set the CanSelect parameter to False to prevent the cell in DrawGrid creation from being selected.
And here is the working example of Value with the Action parameter:
1 2 |
def MainFormClose(self, Sender, Action): Action.Value = caFree |
In the example above, we set the Action parameter to caFree to close the MainForm and freeing all allocated memory for the form.
See the complete code here.
Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.