User Tools

Site Tools


k12:k12.1:k12.1.3:start

12.1.3 Form - Events

This chapter describes events of the Form (gb.qt4) class.

EventDescription
Activate()The event is triggered when the window is activated.
Deactivate()The event is triggered when the window is deactivated.
Open()The event is triggered when the window becomes visible for the first time. If the Close() method is called within the Open event handler, the window will not open.
Show()The event is triggered when the window is displayed.
Hide()The event is triggered when the window is hidden.
Close() As BooleanThe event is triggered when the window is to be closed. You can cancel the closing with the instruction 'STOP EVENT'.
Arrange()The event is triggered when the window has arranged its content.
BeforeArrange()The event is triggered just before the window arranges its contents.
Enter()The event is triggered when the mouse enters the window area.
Leave()The event is triggered when the mouse leaves the window area.
GotFocus()The event is triggered when the window gets the focus.
LostFocus()The event is triggered when the window loses focus.
Icon()The event is triggered when the window icon is changed.
KeyPress()The event is triggered when a key is pressed and the window has the focus → Chapter 14.1.1.
KeyRelease()The event is triggered when a key is released and the window has the focus → Chapter 14.1.1.
Menu()The event is triggered when a user with the mouse over the window presses the right mouse button or presses the menu button. You must use this event to detect if the user wants to open a context menu.
Move()The event is triggered when the window is moved.
NewChild ( Control As Control )The event is triggered when a new control is inserted into the window.
Resize()The event is triggered when the window changes its size.
Title()The event is triggered when the window title is changed.
DblClick()The event is triggered when the user double-clicks on the window. This event is fired anywhere in the window, even on internal scrollbars, buttons or other controls. It is a primitive event like MouseDown and MouseUp. You should not normally need to use it. Instead, you have higher events like Activate. For example, if you want to know if the user has double-clicked on an item of a ListView on the window, use the Activate event.

Table 12.1.3.1 : Events of the class Form

Notice:

The Activate and Deactivate events are triggered when the window is activated or deactivated. To become the active window, a window must be a TopLevel window or implement the Activate event handler if it is not a TopLevel window (embedded window). The Application.ActiveWindow method sets the window to 'active'. If a control of the window then gets the input focus, the window that was active until then is deactivated and the window with the input focus is activated. If the current window cannot become the active window, a suitable parent window is searched for. If a window is minimised, it is deactivated.

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k12/k12.1/k12.1.3/start.txt · Last modified: 01.02.2022 (external edit)

Page Tools