Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » TabBarCtrl and more
TabBarCtrl and more [message #24423] Sun, 17 January 2010 12:17 Go to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
I've added a new tabbed control that mimicks TabCtrl, but using QuickTabs/TabBar widgets for tabbing, which I like for its features.
It's almost a plug-in replacement for TabCtrl, with just one noticeable missing feature, which is the embedding of controls inside tabs (seldom used anyways, I guess).
For most apps should be enough to change dialog type from TabCtrl to TabBarCtrl to use new control.

To allow this, I had to make a couple of modifications of original TabBar code, which BTW don't change the original behaviour if not using the new features.
The changes consist mostly on addition of 2 new callbacks :

WhenCloseSome(Vector<Value> keys)
CancelCloseSome(Vector<Value> keys)

Which get called when closing one OR MORE tabs, with an array parameter containing all closing tabs keys.

The TabBarCtrl has also a couple of callbacks added, in respect to TabCtrl, which allow reacting to close events :
WhenClose(Vector<int> tabs)
CancelClose(Vector<int> tabs)


both are called with an integer array of item indexes.

Beware, as TabBar tabs are draggable/relocatable, TabBarCtrl keeps a map between tabs and items, which is not 1:1 it tabs get dragged. So, closing tab 1 may remove item 5, for example.
When you do Set() and Get(), the reference are always Items, not tabs, so if Item 1 correspond to tab 5, doing a Set(1) wil highlight tab 5.

There's also a small test app, TabBarCtrlTest, in bazaar.

To mrjt : I hope you don't mind for the small mods to your TabBar code, they shouldn't change any behaviour if additional features are not used, anyways.

Ciao

Max

Re: TabBarCtrl and more [message #24428 is a reply to message #24423] Sun, 17 January 2010 15:54 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
Fine by me. Glad you find it useful, it's a pretty cool Ctrl I think
Re: TabBarCtrl and more [message #24441 is a reply to message #24428] Sun, 17 January 2010 23:34 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Thanx, mjrt Smile

Btw, I also added a translation file, if somebody wants to contribute with its own language Smile

Max
Previous Topic: Another Sql Report Generator (Use QTF format)
Next Topic: Bazaar Copyright
Goto Forum:
  


Current Time: Fri Mar 29 13:14:48 CET 2024

Total time taken to generate the page: 0.01470 seconds