Site icon Python GUI

OnClick Event in DelphiVCL Library

pexels thirdman 7652180

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 releases the left mouse button with the mouse pointer over the control. This event can also occur when:

For a form, an OnClick event occurs when the user clicks a disabled component or in a blank area of the form.

OnClick is an event handler of type TNotifyEvent.

Here is the working example of the implementation of an OnClick event:

[crayon-6635cdc0a89c8225666603/]

To see the result, let’s run the complete script:

[crayon-6635cdc0a89d0739353280/]

 

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

Exit mobile version