I have a wizard which uses a Table (2
columns) on one of its pages. I use ColumnWeightDatas to set the
relative initial widths of the table columns. Everything works and looks
fine when my wizard is selected and launched via the toolbar "New Wizard".
The two columns are sized according to the specified proportions and together
they just fill the visible initial width of the table (such that the right
edge of the second column is at the right edge of the table and there is
initially no horiz. scrollbar).
Strangely, however, when I launch my wizard from my
own code (e.g., from one of the editors we're developing), using a
WizardDialog, the table column widths are grossly oversized. That is,
the right edge of the first column is way to the right of the right edge of the
table (i.e., you would have to scroll right in order to be able to see/grab the
column 1/2 separator). The right edge of the second column is even farther
to the right, of course.
I cannot for the life of me figure out what is
going on/wrong in this case. As far as I can tell I'm launching my wizard
the right way (and essentially identically to the way the New Wizard seems to be
doing it). There's nothing I can see that seems like it should have this
effect. One thing I discovered is that (in
the case where I'm launching the wizard from my own code) when the layout
(TableLayout.layout(Composite, boolean)) is initially sizing the columns it
finds that the width of the client area of the table
(table.getClientArea().width) is over 800 pixels (which right off the bat
extends past the physical initial table width on the screen, which is about 150
pixels). When launched from the New Wizard, the client area at this point
is about 150 pixels. So, this initial oversized table client area seems to
be the culprit, but I can't figure out how it gets to be so huge in the
problematic case.
If anyone has any ideas or clues as to what might
be going on or what to do about it, I'd be eternally grateful (well, for a few
days at least) to hear about it. I'd like to be able to use the
ColumnWeightData to size the columns, but if I can't figure out how to solve
this problem I'll have to fall back to explicitly sizing the columns
(ColumnPixelData), which would be too bad because it's not as nice a UI
solution.
Gary Johnston WSED Struts Tooling
Development IBM Software Group, Research Triangle Park,
NC
|