Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 79391 - ControlExample - tab items are truncated
Summary: ControlExample - tab items are truncated
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Carolyn MacLeod CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-24 10:17 EST by Christophe Cornu CLA
Modified: 2012-06-20 12:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe Cornu CLA 2004-11-24 10:17:22 EST
I20041124
Open the controlexample. The tab items on the left and right are heavily truncated.
Is it visible since the new tab item that was added for the spinner?
Comment 1 Steve Northover CLA 2004-11-24 17:23:47 EST
Not sure what to do.  The Mac doesn't scroll the tab folder.  CAR, can we make 
the names shorter ...?  I don't think so.
Comment 2 Andre Weinand CLA 2004-11-30 11:26:50 EST
We could nest two TabFolders and introduce some grouping for the outer TabFolder:
Simple / Complex
Simple / Composite
A-I / J-Z
Set 1 / Set 2
etc.
Comment 3 Carolyn MacLeod CLA 2004-12-03 18:17:28 EST
Andre's suggestion is probably the way to go some day, but for now - and I 
realize that this is a terrible horrible hack - I have just changed the text 
for the "Slider/Scale" tab to "S/S" on the Mac only. This gives just enough 
room for the tab folder when maximized, and when you actually click on the 
tab, it is still obvious that it is for the Slider and Scale widgets because 
those are the group names surrounding each example widget.

This just buys us time to decide what we really want to do.
Comment 4 Markus Keller CLA 2006-03-01 17:18:37 EST
> This just buys us time to decide what we really want to do.

Time is up ;-): With the addition of ExpandBar, the ControlExample's tabs are again wider than the 1280 pixels of my screen...
Comment 5 Carolyn MacLeod CLA 2006-03-02 16:13:42 EST
Sorry! I didn't notice because my Mac is set to 1600 x 1200.  :(

I just tried adding a horizontal scrollbar to the shell to scroll the whole TabFolder side to side. But the problem with that is that all of the other controls inside each TabItem grow as well, so each time you select a tab, you have to scroll back and forth to do anything interesting on that tab. It really was a sub-optimal solution.
Comment 6 Carolyn MacLeod CLA 2006-03-02 16:36:58 EST
OK, so I've decided to buy even more time by adding a horrible hack <g> to the ControlExample. I took out the Mac dependency, because I might as well do the hack on any platform where the ControlExample ends up too wide for the screen (although only the Mac will benefit because it is the only platform that doesn't automatically add scrolling capability to its tabbed folders...).

The hack is as follows:
- compute the desired size
- if too wide for the screen, ask each of the tabs for a "short string"
- recompute the desired size

Short strings are the first letters of any "camel case" controls, i.e. "ProgressBar" becomes "PB", "TabFolder" becomes "TF", etc.

At 1280 pixels wide on my Mac, this gives space for, oh, maybe 3 more tabs before we hit the problem again <grin>. And it doesn't look too bad or too hard to follow... i.e. as soon as you click on "CB" you will see the string "CoolBar" in the group text that surrounds the example coolbar.

I'll leave this bug open in case that ever happens.  ;)

PS: Have you tried 1600 x 1200? - it's quite nice on my 20" flat screen monitor.  :)
Comment 7 Carolyn MacLeod CLA 2012-06-20 12:46:21 EDT
Closing as fixed. Any further changes can happen as needed.