Page 2 of 13

Re: TabBarGadget - Tabs like in a browser

Posted: Tue Sep 20, 2011 2:05 pm
by freepurebasic
:mrgreen: :lol: :P :twisted: :o :shock: :D

Re: TabBarGadget - Tabs like in a browser

Posted: Tue Sep 20, 2011 2:30 pm
by Derren
Nice work.
But when I add several more tabs the only indicator that there are many tabs out of view are the small arrows on the sides.
I feel the tabs should be cut at the edges. I don't use tabs in Firefox anymore, but I believe that's how they did it.
Speeking of which: Scrollwheel support to scroll through the tabs would be nice, too.

Also some way to add text and/or an icon to the "new tab"-tab.

And some more events like, doubleclick and right mouseclick on tab.

Nice touch with the double click on emty space that creates a new tab.
But this should also be handled with a independent double-click event so we can disable this feature.

Nice job, again.

Soon I will not use any standard gadgets anymore. So many cool Canvas-versions :lol:

Re: TabBarGadget - Tabs like in a browser

Posted: Tue Sep 20, 2011 2:56 pm
by STARGÅTE
Derren wrote:Speeking of which: Scrollwheel support to scroll through the tabs would be nice, too.
yes, I include it
Derren wrote:Also some way to add text and/or an icon to the "new tab"-tab.
good idea, like a special constant for position for AddTabBarGadgetItem or SetTabBarGadgetText like
Derren wrote:And some more events like, doubleclick and right mouseclick on tab.
I think at this point we also can use EventType() of PureBasic.
I then add just a EventTab, which returns the tab position of the event, ok?
Derren wrote:Nice touch with the double click on emty space that creates a new tab.
But this should also be handled with a independent double-click event so we can disable this feature.
yes, thats right, the new EventTab() will then return #TabBarGadget_Space or so.

Re: TabBarGadget - Tabs like in a browser

Posted: Tue Sep 20, 2011 3:28 pm
by Derren
STARGÅTE wrote:I think at this point we also can use EventType() of PureBasic.
I then add just a EventTab, which returns the tab position of the event, ok?
Totally fine.
And sounds consistent with PB.
A command to determine what happened and one to determine where it happened.
Thanks for considering my ideas.

Re: TabBarGadget - Tabs like in a browser

Posted: Mon Dec 12, 2011 8:14 pm
by STARGÅTE
It took a little longer, but here are the first beta of the new update:

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
Image

TabBarGadget - Include (12. Dec 2011)
TabBarGadget - Beispiel (12. Dec 2011)

Re: TabBarGadget - Tabs like in a browser

Posted: Mon Dec 12, 2011 8:48 pm
by c4s
Oh wow, this looks wonderful!

Re: TabBarGadget - Tabs like in a browser

Posted: Tue Dec 13, 2011 4:30 am
by idle
looks great thanks

Re: TabBarGadget - Tabs like in a browser

Posted: Tue Dec 13, 2011 10:59 am
by flaith
A real "must have", thanks a lot for sharing :D

Re: TabBarGadget - Tabs like in a browser

Posted: Tue Dec 13, 2011 12:02 pm
by srod
Looks very nice - thanks for sharing.

Re: TabBarGadget - Tabs like in a browser

Posted: Wed Dec 14, 2011 4:39 am
by electrochrisso
Good coding, Thanks for sharing. :)
Should something happen when I use the mouse wheel. :?:

Re: TabBarGadget - Tabs like in a browser

Posted: Wed Dec 14, 2011 5:47 pm
by Lord
electrochrisso wrote:...
Should something happen when I use the mouse wheel. :?:
Yes. If you select a TabBar with "<" or ">" on the ends, you can scroll
the tabs to left/right.

Re: TabBarGadget - Tabs like in a browser

Posted: Thu Dec 15, 2011 3:28 am
by electrochrisso
Yes. If you select a TabBar with "<" or ">" on the ends, you can scroll the tabs to left/right.
Strange, this computer not playing the game, I can delete tabs by clicking on the mousewheel though.
Might need to play with the mouse settings.

Re: TabBarGadget - Tabs like in a browser

Posted: Thu Dec 15, 2011 4:40 pm
by ebs
Stargate,

This is great! Thank you for sharing.

Would you consider adding a flag to prevent the user from being able to move the tabs?
There are some cases when I wouldn't want to allow the tabs to be rearranged by the user.

Thanks,
Eric

Re: TabBarGadget - Tabs like in a browser

Posted: Thu Dec 15, 2011 8:50 pm
by WilliamL
I guess I'm the first to try the TabBarGadget on a Mac.

Small problem. For some reason, in line 128,

Code: Select all

\FontID=GetGadgetFont(#PB_Default)
returns zero. I substituted

Code: Select all

\FontID =FontID(LoadFont(#PB_Any,"Geneva",9)) ; edited 
to see if it would work. It did work so I guess the Mac users will need to know what font/size to use.

[edit] Well, there is a mention of this behavior in the Help manual. Maybe if the font is defined on the Mac version then GetGadgetFont(#PB_Default) would work but that ends up with having to load the font either way...

Re: TabBarGadget - Tabs like in a browser

Posted: Thu Dec 15, 2011 10:30 pm
by STARGÅTE
ebs wrote:Would you consider adding a flag to prevent the user from being able to move the tabs?
I will add it.
WilliamL wrote:I guess I'm the first to try the TabBarGadget on a Mac.
thx for test it on mac.

but \FontID is the Font-ID not the Font-Number, so if you replace it, use this one:

Code: Select all

\FontID = FontID(LoadFont(#PB_Any,"Geneva",9))