ToolbarLayout with fixed size figure [message #182917] |
Mon, 30 May 2005 16:23 |
Eclipse User |
|
|
|
Originally posted by: samiwazni.msn.com
Hi,
I tried after reading newsgroup without success.
I've a container figure say ContainerFigure having an horizontal
toolbarlayout.
This ContainerFigure add FigA having an horizontal toolbarlayout.
Now FigA add N labels.
I tried label.setPreferredSize(cellWidth,-1) and the result is that the
toolbarlayout arrange labels depending on their text size (default
behavior).
I want each label have a fixed width even if their text size is larger or
less than the fixed width. How shoul I proceed ?
Many thanks.
|
|
|
|
Re: ToolbarLayout with fixed size figure [message #183118 is a reply to message #182965] |
Tue, 31 May 2005 14:17 |
Eclipse User |
|
|
|
Originally posted by: samiwazni.msn.com
Thanks for your answer.
Overriding getPreferedSize using a fixed wHint value (150) don't seem to
answer all my needs.
My requirement is the following:
I want actually to change dynamically the label width. That is, after the
changes, all labels in FigA must have the same new fixed width.
ContainerFigure (horizontal) include many sequencial figures (FigA, FigB,
...)
For example
FigA include 10 sequential labels whose width are 20 (even if text width
is >20 or < 20)
FigB include 20 sequential labels whose width are 30, etc ...
FigA width must be equal to 10 * 20
FigB width must be equal to 20 * 30
ContainerFigure width must be equal to FigA width plus FigB width
Should I continu using ToolBarLayout. If yes, could you please tell me
more on how to proceed.
Many thanks.
|
|
|
|
Re: ToolbarLayout with fixed size figure [message #183142 is a reply to message #183119] |
Tue, 31 May 2005 15:58 |
Eclipse User |
|
|
|
Originally posted by: samiwazni.msn.com
In fact, I'm using the ToolBarLayout just for adding figures in sequence
without worrying about the sequence problem. At the same time, I would
like to keep control on the figures size (schown via their border).
I already can do that using XYLayout which would require to manage x and y.
As I have a lot of different composed sequential figures, I would prefer
use the toolbaylayout if possible.
Many thanks.
|
|
|
Powered by
FUDForum. Page generated in 0.03447 seconds