TabBarGadget - Tabs like in a browser

Share your advanced PureBasic knowledge/code with the community.
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

TabBarGadget - Tabs like in a browser

Post by STARGÅTE »

The TabBarGadget created a bar with tabs without its own container e.g. the PanelGadget.

Image

With different attributes, the appearance of the bar and the tabs are changed,
for example by a "close" button is added.
The tabs can be interchanged by simply dragging the mouse are reversed.
If a card is closed or opened a new, an event is returned,
so the programmer can perform an action themselves.
Also automatically creates a navigation when there are too many tabs

_______________________________________________________________________________________

Version 1.5 Beta 2 for PB 5.30+
Download: TabBarGadget V 1.5 Beta 2
Online help: TabBarGadget Help (english)

Version 1.3 until PB 5.11
Archive: TabBarGadget.zip (Include, Example and Help)

TabBarGadget on GitHub:
https://github.com/kenmo-pb/TabBarGadget

TabBarGadget modified by Mesa:
TabBarMesa.zip

_______________________________________________________________________________________

Image
Checkboxes example:
Image
1.5 Beta 2 example:
Image

_______________________________________________________________________________________

Update 1.5 Beta 2 (6. August 2014)
  • SetTabBarGadgetItemAttribute() and GetTabBarGadgetItemAttribute(): Changes or returns the attribute of a tab.
    So you can add a checkbox or a close button on a single tab.
  • #TabBarGadget_TabTextAlignment: Changes the alignment of the text in a tab with more space.
  • #TabBarGadget_SelectedCloseButton: Add a close button only on selected tabs.
  • #TabBarGadget_ReverseOrdering: Reverses the ordering of the tabs (to "right to left").
    The feature is for example for arabic tab bars.
  • A first version of a new online documentation in english: http://help.unionbytes.de/tbg/
Update 1.5 Beta 1 (19. October 2013)
  • Conversion of event management to PB 5.20 and BindEvent().
    TabBarGadgetEvent() is not necessary, event types
    can be queried with EventType().
  • When you create the gadget, window parameter is important.
  • Some constant names have been changed to be similar PureBasic.
  • EventTab(​​) I've removed to avoid name collision,
    it is now GetTabBarGadgetItemPosition() and SetTabBarGadgetItemPosition()
    so tabs can be moved with a command.
  • In addition, the functionality of vertical tabs, multi-select, checkboxes and the navigation has been improved.
  • The auto scroll does only work if threadsafe is enabled (for security)
Update 1.3 (1. Sep 2012)
  • Multiline tab bar
  • Procedures to set tooltips for each tab item, the close button and the new tab
  • Set minimum and maximum of tab width
Update 1.2 (1. Mar 2012)
  • Full support as *.chm and online (first only in german, english will come soon)
  • Other procedures such as SetTabBarGadgetAttribute(), SetTabBarGadgetItemColor(), DisableTabBarGadgetItem()
  • A few new attributes: NoTabMoving, MirroredTabs, TabRounding
  • Improvements in the representation of movement and navigation
Update 1.1 (Beta) (12. Dec 2011)
  • Many new procedures for the gadget added
  • Optional text cut in too little space
  • EventTab() for use with EventType() to determine the tab with the event
  • Using mouse wheel for navigation
  • tool tip text for each tab
  • Improved (animated) representation of the shift tab
_______
original german topic: http://www.purebasic.fr/german/viewtopi ... =8&t=24788
Last edited by STARGÅTE on Sat Nov 18, 2023 5:40 pm, edited 21 times in total.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
luis
Addict
Addict
Posts: 3876
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: TabBarGadget - Tabs like in a browser

Post by luis »

Very nice, good work !
"Have you tried turning it off and on again ?"
A little PureBasic review
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8425
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: TabBarGadget - Tabs like in a browser

Post by netmaestro »

Looks excellent and quite useful too. Thanks for sharing 8)
BERESHEIT
User avatar
Kwai chang caine
Always Here
Always Here
Posts: 5342
Joined: Sun Nov 05, 2006 11:42 pm
Location: Lyon - France

Re: TabBarGadget - Tabs like in a browser

Post by Kwai chang caine »

Splendid :shock:
Thanks a lot for sharing 8)
ImageThe happiness is a road...
Not a destination
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: TabBarGadget - Tabs like in a browser

Post by rsts »

Good one :D

Thanks for sharing.
Polo
Addict
Addict
Posts: 2422
Joined: Tue May 06, 2003 5:07 pm
Location: UK

Re: TabBarGadget - Tabs like in a browser

Post by Polo »

Very nice!

When you've got the arrows to scroll the tabs, you should show the new tab button only when the scrolling is at the end, like in Firefox.
User avatar
Kuron
Addict
Addict
Posts: 1626
Joined: Sat Oct 17, 2009 10:51 pm
Location: Pacific Northwest

Re: TabBarGadget - Tabs like in a browser

Post by Kuron »

Very, very useful. Excellent work. Thank you, very much!
Best wishes to the PB community. Thank you for the memories. ♥️
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: TabBarGadget - Tabs like in a browser

Post by kenmo »

Awesome! Looks very good, and I like the way you handle your custom events.

... I wish I had a use for this right now! :)
User avatar
USCode
Addict
Addict
Posts: 912
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle, USA

Re: TabBarGadget - Tabs like in a browser

Post by USCode »

I think we're going to be seeing LOTS of interesting gadgets from folks with the new canvas gadget.
User avatar
flaith
Enthusiast
Enthusiast
Posts: 704
Joined: Mon Apr 25, 2005 9:28 pm
Location: $300:20 58 FC 60 - Rennes
Contact:

Re: TabBarGadget - Tabs like in a browser

Post by flaith »

:shock: Awesome, thanks for sharing
“Fear is a reaction. Courage is a decision.” - WC
said
Enthusiast
Enthusiast
Posts: 342
Joined: Thu Apr 14, 2011 6:07 pm

Re: TabBarGadget - Tabs like in a browser

Post by said »

very very nice, clean! Thanks a lot for sharing

this kind of cross platform gui work fills an important gap in PB! Great idea, this new canvas gadget.

Since this is my first post, i'd like also to thank the whole forum community, it is just a great one! I have learned so much from you all. Thank you all.
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: TabBarGadget - Tabs like in a browser

Post by STARGÅTE »

I thank you all for your praise.

If you have ideas yet, just bring it.
my ideas for flags for next version:
- multi-line tab bar instead of scrolling
- Text cutting off in too many tabs instead of scrolling like
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: TabBarGadget - Tabs like in a browser

Post by Fangbeast »

I remember wanting something like this a few years ago, nicely rounded tabs and lacked the skill to make them.

This looks pretty, just hope I can understand it enough to incorporate it. Would look very nice in a project I have in mind.

Thanks STARGÅTE, looks great!
Amateur Radio, D-STAR/VK3HAF
User avatar
freepurebasic
Enthusiast
Enthusiast
Posts: 123
Joined: Fri Sep 24, 2010 12:02 pm
Location: world wide web

Re: TabBarGadget - Tabs like in a browser

Post by freepurebasic »

hmmmm ,nice example with this .pbi but if you wanna see the rest just go here and download all you are interested :

http://data.unionbytes.de/



eg:
http://data.unionbytes.de/TabTable.pbi
http://data.unionbytes.de/TableGadget.pbi
http://data.unionbytes.de/TabBarGadget.pbi

i am not a hacker :mrgreen: :mrgreen: :mrgreen:
he have a .httaccess wrong functional :mrgreen:


so i see this too :
http://data.unionbytes.de/GuttPhysik/

wooow :twisted:
User avatar
STARGÅTE
Addict
Addict
Posts: 2067
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: TabBarGadget - Tabs like in a browser

Post by STARGÅTE »

lol,
some of these codes are very old and are no longer supportet by me.
this directory is just a data platform for public.

"he have a .httaccess wrong functional"
No, this is as true, finally I've written this own directoyindex
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Post Reply