The ClassInfo method or DelphiVCL.Application.ClassInfo is used to return a pointer to the run-time type information (RTTI) table for the object type.
ClassInfo provides access to the RTTI table for a given object type.
Some classes do not provide run-time type information. For these classes, ClassInfo returns nil (Delphi) or NULL (C++). All classes descended from TPersistent do…
Understanding delphivcl.Application.CancelHint
June 6, 2021
The CancelHint method or DelphiVCL.Application.CancelHint is used to cancel the display of a hint for a control.
Applications rarely, if ever, call CancelHint directly. CancelHint is used internally to cancel the display of hints at appropriate times, such as when a…
How to use the Caption Property
June 4, 2021
We use Caption to specify a text string that identifies the control to the user.
To underline a character in a Caption that labels a component, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can…
How to use the Parent Property
June 3, 2021
We use the Parent property to get or set the parent of the control. The parent of a control is the control that contains it. For example, if an application includes three radio buttons in a group box, the group box is the parent of the three radio buttons, and the radio buttons are the child controls of the group box.
To serve as a parent, a control must be an instance of a TWinControl…
We use TextRect to write a string inside a clipping rectangle or within a limited rectangular region. Any portions of the string that fall outside the rectangle passed in the Rect parameter are clipped and don’t appear. The upper left corner of the text is placed at…
OnClose Event in DelphiVCL4Python Library
June 1, 2021
OnClose event occurs when the form closes.
We use OnClose to perform special processing when the form closes. The OnClose event specifies which event handler to call when a form is about to close. The handler specified by OnClose might, for example, test to make sure…
OnSelectCell Event in DelphiVCL4Python Library
May 31, 2021
OnSelectCell event occurs before a cell in the grid is selected.
Write an OnSelectCell event handler to specify whether any particular cell in the grid can be selected. The Col and Row parameters indicate the column and row indexes of the cell that is about to be selected. Set the CanSelect parameter to False to prevent the cell being selected.
Here is the working example of the…
OnDrawCell Event in DelphiVCL4Python Library
May 30, 2021
OnDrawCell event Occurs when a cell in the grid needs to be drawn.
We write an OnDrawCell event handler to draw the contents of all the cells in the grid. Draw on the cell using the methods of the Canvas property. The Rect parameter indicates the location of the cell…
OnChange Event in DelphiVCL4Python Library
May 29, 2021
OnChange event occurs when the user changes the text displayed in the edit region.
We write an OnChange event handler to take specific action immediately after the user edits the text in the edit region or selects an item from the list. The Text property gives the new…
OnClick Event in DelphiVCL4Python Library
May 28, 2021
OnClick event occurs when the user clicks the control.
We use the OnClick event handler to respond when the user clicks the control. If the control has an associated action, and that action has an OnExecute method, the action’s OnExecute method responds to click events unless it is superseded by an OnClick event handler.
Usually, OnClick occurs when the user presses and…