Are there any plans to implement tab-scrolling in any form as part of
the widget? I did not find any TIP relating to ttk::notebook.
http://wiki.tcl.tk/20057 has a sample-code for adding tab-scrolling
'externally', but IMHO this should be part of the widget interface
itself.
R'
The issue has been that Joe English things (with good reason IMO) that
having too many tabs - more than will fit across the top without
scrolling - is an indication of a poor interface. There's also the
issue of whether the tabs should be scrolled or stacked; I've seen
both and neither is all that great. (Datapoint: Safari on OSX Leopard
uses a variation, putting a menu on to allow the selection of tabs
when there's more than will fit. I just try to keep the number of tabs
down.)
Given all that, it's a surprisingly awkward topic.
Donal.
In our case it's not too many labels but too wide tab titles (text set
by the user).
I see that ttk::notebook implements a smarter strategy to fit all tabs
on the page regardless of the tab text:
Compare
package require Ttk
wm geometry . {600x400}
pack [ttk::notebook .nb] -fill both -expand yes
for {set i 1} {$i <= 5} {incr i} {
.nb add [frame .nb.p$i] -text "$i Some long label text on a tab"
}
package require Tix
pack [tixNoteBook .tnb] -fill both -expand yes
.tnb subwidget nbframe configure -font {Helvetica 10}
for {set i 1} {$i <= 5} {incr i} {
.tnb add p$i -label "$i Some long label text on a tab"
}
So I guess it's a first step to change to ttk::notebook instead if tix
or iwidgets.
Thanks
R'
Unfortunately telling your users that they are only allowed 5 tabs or
that their names are too long is not sufficient, they are used to
having programs like firefox which work with many tabs and long names,
so I have to stick to a patched BWidget to scroll the tabs and adjust
colours if the user changes themes.
I agree that multiple tier tabs are not the solution but scrunching
the tabs up until you can no longer read anything is a very ugly
solution, possibly even worse.
Martyn
I don't agree with the whole issue of bad GUI design. In my application
I have notebooks with many tabs. The tabs at the end contain rarely used
functionality, but its good to be there for the few times the user is
going to need it.
There is a reason that all other toolkits have scrollable tabs...
George
Hi all !
I also believe having scrollable tabs would be very handful for my Tk
GUIs.
Thomas
As I said above Bwidget handles scrolling tabs by default when there
are too many it adds a couple of arrow buttons the code is very clear
and I simply added a new element to my mouse wheel focusing code to do
a
NoteBook::_xview $::Gui(NoteBook) $step
where step is 1 or -1, it even stops scrolling at the end.
Martyn