This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
TAB automatic handling events
To simply some common tasks when using TAB that usually would require many lines of code, thinBasic has developed few automatic event handling functions.
Just one line of code substitute a lot of struggling when using TAB controls.
3 are the events handled by those functions:
1.Resizing
When a TAB control is resized, all sub windows inside each TAB page must be resized.
In this case just add TAB_OnResize function to %WM_SIZE event and all the job will be done automatically
2.Notify
When a TAB page is selected, usually the job to be done is to hide the window connected to the previously selected Tab page and show the window associated to the new Tab page.
In this case just add TAB_OnNotify function to %WM_NOTIFY event and the above duty will be done by thinBasic engine
3.Destroy
When TAB control is desroyed, all the windows associated with the Tab pages must be destroyed either.
In this case just add TAB_OnDestroy function to %WM_DESTROY event to have the job done.
Example: the following example show a typical dialog callback where %ID_TAB represent a TAB control placed over the window.
'----------------------------------------------------------------------------
CALLBACK Function cb_Main()
'----------------------------------------------------------------------------
'---Test the message
Select Case CBMSG
'---Message fired at the very beginning when dialog is initialized
Case %WM_INITDIALOG
Case %WM_SIZE
Tab_OnResize(CBHNDL, %ID_Tab)
Case %WM_DESTROY
Tab_OnDestroy(CBHNDL, %ID_Tab)
Case %WM_NOTIFY
'---Check which control fired notificatin message
Select Case CBCTL
Case %ID_Tab
Tab_OnNotify(CBHNDL, %ID_Tab, CBLPARAM)
End Select
End Select
End Function