FLTK logo

STR #3052

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]

STR #3052

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fl_Tabs enhancement: tab scrolling when there are too many tabs
Version:1.3-feature
Created By:guyben
Assigned To:matt
Fix Version:1.4.0
Fix Commit:8826dca1066361b474139bcc5aeed2e3a5246ed0
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 guyben
10:15 Feb 13, 2014
Fl_Scroll_Tabs.zip
7k
 
 
#2 guyben
10:35 Feb 13, 2014
main_scroll_tabs.cc
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 guyben
10:15 Feb 13, 2014
The current Fl_Tabs works fine, and it should stay as it is.

However, there is a need for more "browser-like" tabs, for cases where the number of tabs changes during the program. This can result in very-long-named tabs (which currently don't work well), as well as a large number of tabs (which also currently don't work well).

I propose a new class - Fl_Scroll_Tabs.

Features:
* All tabs have the same width (shorter names are padded, longer names are truncated)
* If there are too many tabs (so their size is under some minimum value), 2 buttons appear on the tab-bar, for left and right scrolling. In this case, only part of the tabs will be visible.
* maybe: possibility of a general purpose button on the tab bar (for, e.g., creating a new tab etc.)

I have created an initial version - attached.
 
 
#2 AlbrechtS
05:37 Mar 26, 2015
See also STR #3211 for an alternate proposal and comments.
Some comments may apply to this STR as well.

Note: tested, works.

My first opinion from a short test: needs more testing and probably some fine tuning.
 
 
#3 guyben
12:34 Mar 30, 2015
Hey! Cool! Someone took notice :) Did you encounter any specific problems? I'll gladly work on it some more if there is a change it will be used!

You want to check out #3053 as well? It allows for detachable tabs (again, like firefox) and can be set on either the existing tabs or this new scrolling tab

Cheers!
 
 
#4 AlbrechtS
05:48 Mar 31, 2015
Okay, I see (STR #3053), I didn't test this though (yet). I'll need some more time.

Please take a look at my comments on STR #3211, particularly comment #3 on code formatting an inheriting from Fl_Tabs.
http://www.fltk.org/str.php?L3211

Particularly your tab setting must be changed. The code is almost unreadable with a tab setting of 8 spaces/columns.

Both proposals (#3211 and yours, #3052) are similar and even use the same class name. I'd appreciate if you could compare and maybe work together with Martin on improvements (the best of both!). Martin's proposal does now inherit from Fl_Tabs. What's the difference to yours? IMHO the Fl_Scroll_Tabs class should not only inherit from Fl_Tabs, but also provide the same features (e.g. tabs on bottom). This is now available in Martin's proposal.

I can imagine having your Fl_Drag_Tabs (STR #3053) combined with (derived from) Fl_Scroll_Tabs, whatever implementation we choose. Would this work? Could it work if the tabs were at the bottom? Are there methods in your Fl_Scroll_Tabs class that you rely on in Fl_Drag_Tabs? I don't think so because you wrote that Fl_Drag_Tabs can also inherit from Fl_Tabs, so this should be okay.

Thanks for your support!
 
 
#5 matt
15:25 Jan 04, 2023
In GitHub PR #628 I have implemented a few alternatives on how to handle overflow. This includes dragging the tabs to the left and right, albeit without showing arrows. You just click and drag on the tabs.  
 
#6 matt
05:16 Jan 05, 2023
Fixed in Git repository.  
     

Return to Bugs & Features ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.