PDA

View Full Version : Callbacks



Pipes
29-05-2009, 15:57
Hey... Thanks for the explanation of callbacks, Petr Schreiber, in the Thin Basic Journal # 2. It really clearified the subject for me. So now that I have some understanding of the subject, I have some questions.

Are callbacks available for all the controls that can be used in thinBasic UI module? For instance, How do you designate a callback procedure for spliiter controls. I found no example in any of the sample scripts. (Splitter_Create hDlg, %ID_splMain, %SWS_HORIZONTAL, 0, 0, 0, 0 CALL SplitterProc) doesn't work. There seems to be a deficiency of example scripts for most of the controls and no examples in the help files. To be honest, the whole movement from Blitz Basic and Blitz Plus to thinBasic is arduous for me without examples of the intricacies and subtlities of windows programming. Any suggestions or help will be appreciated.

Pipes

ErosOlmi
29-05-2009, 16:08
Hi Pipes,

not all controls have the possibility to specify a callback function.
If you check in help for CONTROL ADD (http://www.thinbasic.com/public/products/thinBasic/help/html/controls.htm) or specific controls creation functions like Splitter_Create (http://www.thinbasic.com/public/products/thinBasic/help/html/splitter_create.htm) you will see the syntax and see which controls has callback possibility and which not.

Regarding Splitter control you can found some examples in the following directories:
\thinBasic\SampleScripts\UI\Splitter\
\thinBasic\SampleScripts\UI\ViewPort\
\thinBasic\SampleScripts\UI\CallBacks\_Tab\

Ciao
Eros

Pipes
29-05-2009, 16:18
Hey Eros

Thanks for the rapid response and guidence. That's one reason I keep working at thinBasic. I knew someone would reply in a short time.

Pipes