PDA

View Full Version : Splitter control (experimental)



ErosOlmi
18-01-2008, 19:35
Hi all,

here it is another experiment I'm working on: Splitter control.
As soon as UI scripts get complex with many controls on the window, a Splitter control can save a lot of headhakes. So here it is the point I'm so far with this control.

There are still many problems to solve but it seems not bad.
Known problems: resizing, refreshing, borders.

We will see. Let me know what do you think.
Ciao
Eros

UPDATES:

2008.01.20: attached file updated. Improved UI module to better interact with splitter control.
Improved script example
2008.01.21: attached file updated. Implemented the following functions:
Splitter_SetSplitPosPct set the position of splitter bar using a percentage
Splitter_SetBarSize set the size of the splitter bar
Splitter_SetPaneMinSize set the minimum size of panes
See example for usage.
Improved script example


UPDATES:
Attached file removed. Functionality now present in current thinBasic preview version 1.6.0.1

Petr Schreiber
18-01-2008, 19:44
Hi Eros,

ok here :)
I like the simple syntax too!

Bye,
Petr

kryton9
19-01-2008, 00:04
Worked well here also Eros. Thanks!

Michael Hartlef
19-01-2008, 08:04
Same here, works without a problem. :)

ErosOlmi
20-01-2008, 22:33
Attached files in first post of this thread updated.
New script example with 2 Splitters, menu, ListView, TextBox.

Pay attention to the parent window handlers. When a control is placed into a Splitter, its parent window change. Splitter becomes the parent window of the control. The new example shows you how to get the Splitter handle and how to interact with controls inside Splitters. In the example there are 2 Splitters one inside the other plus some controls inside them. For example, ListView is inside Vertical Splitter, Vertical Splitter is inside Horizontal Splitter.

Ciao
Eros

Michael Hartlef
20-01-2008, 22:45
Works great!!!!

Petr Schreiber
20-01-2008, 23:00
Another great script,

it works and looks pretty cool!


Bye,
Petr

ErosOlmi
20-01-2008, 23:07
I'm very happy it starts working fine because this control will be important for more advanced UI scripts.

I'm still working on automatic PIXEL/UNITS conversions. If you create a new dialog, it is created in Dialog Units while Splitter control is working in pixels. I want it automatic depending on how dialog was created. I'm not far from the solution.

Ciao
Eros

ErosOlmi
20-01-2008, 23:46
I'm also adding few new features:

set percentage position of the split bar
set the size of the split bar by splitter control. Now default to 5 pixels for all splitter controls
set the minimum size of splitter panes by splitter control. Now default to 10 pixels for all splitter controls.

kryton9
21-01-2008, 01:39
Eros, great job, really will give that professional look and feel to our applications! Thanks

ErosOlmi
21-01-2008, 08:54
Attached file in first post updated.
Implemented the following functions:

Splitter_SetSplitPosPct set the position of splitter bar using a percentage
Splitter_SetBarSize set the size of the splitter bar
Splitter_SetPaneMinSize set the minimum size of panes

See example for usage.

Ciao
Eros

ErosOlmi
21-01-2008, 16:52
UPDATES:
Attached file removed. Functionality now present in current thinBasic preview version 1.6.0.1