Display problem on increasing font size [message #506092] |
Wed, 06 January 2010 00:02  |
Eclipse User |
|
|
|
Hi,
For the view, when i increase the OS font size on Windows Vista some parts of the view are cut. I have a group and labels in it. I have given grabExcessHorizhontal as true for the group and horizontalAlignment as GridData.FILL for the labels. If I set configurer.setInitialSize(new Point(400, 300)); in preWindowOpen() method, when I change font size then also the window size will remain same and some labels are not visible.
Is there any way to set the initial window size to fit all componets and adjust automatically with OS property changes?
Thanks,
Biju
|
|
|
|
|
Re: Display problem on increasing font size [message #507226 is a reply to message #506337] |
Tue, 12 January 2010 09:51  |
Eclipse User |
|
|
|
If you want to allocate just enough space to fit your controls then
specifying a hardcoded size anywhere is probably not a good thing to do. I
don't know what "configurer" is in your description, but is there any way
that you can just not call setInitialSize()? Or, if you must call this, you
can ask one of your Controls (like your top-most Composite) for its
preferred size with Control.computeSize(SWT.DEFAULT, SWT.DEFAULT), and then
pass this result to setInitialSize(). A Control's preferred size will take
the current font size into account.
HTH,
Grant
"Biju" <biju.t@tcs.com> wrote in message
news:hi3pq1$12g$1@build.eclipse.org...
> Thanks for the replay Grant.
>
> But im setting the initial window size in preWindowOpenMethod() as
configurer.setInitialSize(new Point(335, 300)); So its always opening the
window in that size even if I increased the font and some controls are cut.
> The controls are visible if I expand the window.
> I want the outer window to be of just enough size in all case to fit all
controls. I tried setting shell.setMinimumSize(335, 300);. But in that case
the window is expaning too large on increasing font. Can u please guide me
on the issue?
|
|
|
Powered by
FUDForum. Page generated in 0.03467 seconds