View Full Version : Help on testing some new future features
ErosOlmi
14-08-2008, 11:20
Hi all,
I need confirmations if some new features we are developing are working or not.
Attached to this post you will find a bundled exe that implements new User Interface CALLBACKS for dialogs and controls. It also implements Tab Control.
You should get an application like the attached image: a sort of easy address book with tabs. Data is loaded from a text file included in the bundled exe.
Can you please see if you get any problem/error running the application?
If yes, can you be so kind to state:
description of the problem
operating system version
Thanks a lot
Eros
Eros, all works great on WinXP. I went through all the tabs and looked at the data all was there!
The menus worked just fine too!!
ErosOlmi
14-08-2008, 11:45
Thanks a lot Kent.
As indication: "Info", "References" and "Links" Tabs are just empty. Window should resize and all controls in main and child windows should resize accordling.
CPU usage should be very close to zero.
Creating Tabs and handling them will be easy like adding a control: only one line. ThinBasic will create child windows inside any Tab and will handle automatically tab switching and resizing.
Ciao
Eros
Yeah, it worked fine in Vista too. ;)
ErosOlmi
14-08-2008, 11:50
Thanks a lot Matthew.
Petr Schreiber
14-08-2008, 12:06
I tried it on XP box and worked well,
the effect of edit field highlighting is very nice.
Petr
ErosOlmi
14-08-2008, 12:15
It is all done using new Callbacks functionality that will be present in next release.
It will add precise control to every aspect of the User Interface without the filter of UI module.
For example the effect of coloring background color of text fields when they get focus is done in this way.
When adding a new field just indicate which is the callback function that will handle field events (obviously it is not mandatory):
'...
CONTROL ADD textbox, cbhndl, %CtrlID, , xPos, yPos, tWidth, lHeight, %WS_CHILD, , call cb_Text
'...
Note that the name of the callback can be a function or a text expression resulting to a function name.
So the following will produce the same effect:
'...
CONTROL ADD textbox, cbhndl, %CtrlID, , xPos, yPos, tWidth, lHeight, %WS_CHILD, , call cb_Text
'... OR
CONTROL ADD textbox, cbhndl, %CtrlID, , xPos, yPos, tWidth, lHeight, %WS_CHILD, , call "cb" & "_Tex" & chr$(asc("t"))
This open an extreme freedom in handling callbacks names.
The callback function adding coloring is the following:
'----------------------------------------------------------------------------
callback function cb_Text()
'----------------------------------------------------------------------------
'---Common to all fields
select case CBCTLMSG
case %EN_SETFOCUS
'---When textbox get focus, change colors
CONTROL SET COLOR CBHNDL, CBCTL, -1, rgb(233, 244, 250)
return %TRUE
case %EN_KILLFOCUS
'---When the control lost its focus, change colors to standard one.
CONTROL SET COLOR CBHNDL, CBCTL, 0 , rgb(255, 255, 255)
return %TRUE
end select
end function
Of course inside the callback you can check many other aspects at every events that will occur.
I'm very excited about the many possibilities that will open callbacks introduction. The most important is the way a UI window will be handled in thinBasic: it will be the same as programming in real compilers.
Michael Hartlef
14-08-2008, 13:52
Worked fine here too: WinXP.
Petr Schreiber
14-08-2008, 15:25
I tried the program on Win98 and works ok,
just the highlighting behaves a bit differently, see screen.
It basically highlights the text, but not control as a such - this might be feature of older Windows, I am not sure.
But as you can see, after I highlighted all items, they did not swapped back to white background.
Petr
Eros:
It works fine for me under XP.
Pretty neat.
Don B.
ErosOlmi
14-08-2008, 16:15
@Don
Thanks for testing. Another confirmation. Hope to give this new power as soon as possible. I have so much help docs to write ;)
@Petr
I also tested under WinMe and foiund some strange behave. I didn't check MS documentation yet. Maybe some TEXTBOX messages are handled a little differently. I will check soon.
Ciao
Eros
I thought I'd test it using Wine in Ubuntu, it worked fine, I've attached an image.
Edit
The original image was missing the Window border so I've updated it with a new one. ;)
ErosOlmi
14-08-2008, 17:00
:D Thanks!
catventure
14-08-2008, 17:53
No Probs here also.
Vista.
catventure
ErosOlmi
14-08-2008, 17:58
Good. Thanks
I think I'm on th right track.