Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

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.

 

While thinBasic allows you to define and manipulate controls via procedural commands, it also introduces the concept of the Control Pseudo-objects.

 

Control Pseudo-objects are just standard user interface controls but with a unique name that allows control manipulation and events reactions using control name as main identifier inside scripts.

 

These Controls behave like standard Controls (have methods and properties), allow processing of events and make the whole process of control manipulation much easier, compared to the low level Win32 procedural way.

 

How do you create control pseudo-object variable?

 

They are created for you in the following cases:
 

DIALOG NEW created dialog from #RESOURCE (then control pseudo-objects named as the controls in the resource for given dialog are created)
 

Control Add ... indicating optional NAME parameter. thinBasic will create a run time control pseudo-object object identified by the control name.
Using the given name it is possible to interact with the control more easily to change control properties and react to control events.
 

An example

 

...
'---Add a button named myButton  

CONTROL ADD BUTTON Name myButton, hwnd, ctrlID, txt, xPos, yPos, Width, Height

 

'---myButton can be later used to manipulate new button

myButton.X =  10

myButton.Y =  10

myButton.W = 180

myButton.H =  32

myButton.Text = "Open"

...

 

'---Events can be intercepted adding an event handler choosing one of the handler available
CallBack Function myButton.OnSize() As Long
End Function
 
CallBack Function myButton.OnClick() As Long
End Function

 

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software