equal size for buttons on a GridLayout [message #331015] |
Thu, 21 August 2008 09:28  |
Eclipse User |
|
|
|
Originally posted by: zhodaie.gmail.com
Hi all,
i have a GridLayout with 5 column and the columns are not of equal
width, i.e.:
gridLayout = new GridLayout(5, false);
now i have some buttons with different long texts on this grid layout.
But the problem is that the buttons apear in different width based on
their text.
I set the widthHint for all buttons to a value equal to the width of
longest button. This looks good on windows, but on Mac OS X the buttons
do not apear so long as i expected. Any idea how can i set the width for
all button independent on their text in a standard way?
Thanks in advance,
Zardosht.
|
|
|
Re: equal size for buttons on a GridLayout [message #331018 is a reply to message #331015] |
Thu, 21 August 2008 10:07   |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
Zardosht Hodaie wrote:
> Hi all,
>
> i have a GridLayout with 5 column and the columns are not of equal
> width, i.e.:
> gridLayout = new GridLayout(5, false);
>
> now i have some buttons with different long texts on this grid layout.
> But the problem is that the buttons apear in different width based on
> their text.
> I set the widthHint for all buttons to a value equal to the width of
> longest button. This looks good on windows, but on Mac OS X the buttons
> do not apear so long as i expected. Any idea how can i set the width for
> all button independent on their text in a standard way?
>
> Thanks in advance,
> Zardosht.
How abou creating another composite just for these buttons and using a
GridLayout(5, true) for that composite?
--
Derek
|
|
|
Re: equal size for buttons on a GridLayout [message #331020 is a reply to message #331018] |
Thu, 21 August 2008 13:30  |
Eclipse User |
|
|
|
Originally posted by: zhodaie.gmail.com
Derek schrieb:
> Zardosht Hodaie wrote:
>> Hi all,
>>
>> i have a GridLayout with 5 column and the columns are not of equal
>> width, i.e.:
>> gridLayout = new GridLayout(5, false);
>>
>> now i have some buttons with different long texts on this grid layout.
>> But the problem is that the buttons apear in different width based on
>> their text.
>> I set the widthHint for all buttons to a value equal to the width of
>> longest button. This looks good on windows, but on Mac OS X the
>> buttons do not apear so long as i expected. Any idea how can i set the
>> width for all button independent on their text in a standard way?
>>
>> Thanks in advance,
>> Zardosht.
> How abou creating another composite just for these buttons and using a
> GridLayout(5, true) for that composite?
>
thank you! a super solution ;)
|
|
|
Powered by
FUDForum. Page generated in 0.63966 seconds