Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » equal size for buttons on a GridLayout
equal size for buttons on a GridLayout [message #331015] Thu, 21 August 2008 09:28 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 ;)
Previous Topic:Problem with showing popup message in Custom Install Handler
Next Topic:CommonNavigator refresh issues on changing file content type
Goto Forum:
  


Current Time: Thu Feb 06 14:05:05 GMT 2025

Powered by FUDForum. Page generated in 0.63966 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top