Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Which version of SWT required for snippet 175...
Which version of SWT required for snippet 175... [message #451304] Fri, 25 February 2005 08:46 Go to next message
Eclipse UserFriend
Originally posted by: msmiths.uk.ibm.com

Hi,

I am looking for a way of ensuring that invisible widgets are not taken into
account when calculating the layout of GridLayout. I see that snippet 175
claims to be able to do this by setting GridData.exclude to true. However,
I am using SWT version 3.0, and the GridData class does not appear to have
this member. Which version of SWT do need to get this behavior.

The relevant code from snippet 175 is as follows:

final Button bHidden = new Button(shell, SWT.PUSH);
bHidden.setText("Button 1");
GridData data = new GridData();
data.exclude = true;
data.horizontalSpan = 2;
data.horizontalAlignment = SWT.FILL;
bHidden.setLayoutData(data);

Thanks.
Re: Which version of SWT required for snippet 175... [message #451309 is a reply to message #451304] Fri, 25 February 2005 11:55 Go to previous messageGo to next message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
You need 3.1 M5 or later.

"Martin Smithson" <msmiths@uk.ibm.com> wrote in message
news:cvmoll$pu$1@www.eclipse.org...
> Hi,
>
> I am looking for a way of ensuring that invisible widgets are not taken
> into
> account when calculating the layout of GridLayout. I see that snippet 175
> claims to be able to do this by setting GridData.exclude to true.
> However,
> I am using SWT version 3.0, and the GridData class does not appear to have
> this member. Which version of SWT do need to get this behavior.
>
> The relevant code from snippet 175 is as follows:
>
> final Button bHidden = new Button(shell, SWT.PUSH);
> bHidden.setText("Button 1");
> GridData data = new GridData();
> data.exclude = true;
> data.horizontalSpan = 2;
> data.horizontalAlignment = SWT.FILL;
> bHidden.setLayoutData(data);
>
> Thanks.
>
>
Re: Which version of SWT required for snippet 175... [message #451310 is a reply to message #451309] Fri, 25 February 2005 13:00 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I don't want to insist on this topic but I've posted yesterday a
proposal to the SWT-List. About creating an own snippet-page where all
those things like SWT-Version, ... are covered.

Maybe someone could point me to a place where I should ask about this.
On swt-Mailling list I didn't get any feedback.

For all those not reading the swt-maillinglist here is what I thought
about snippets-page:

http://codesnippets.services.openoffice.org/Writer/Writer.Ch angeDocumentBackgroundColor.snip

Tom

Veronika Irvine wrote:
> You need 3.1 M5 or later.
>
> "Martin Smithson" <msmiths@uk.ibm.com> wrote in message
> news:cvmoll$pu$1@www.eclipse.org...
>
>>Hi,
>>
>>I am looking for a way of ensuring that invisible widgets are not taken
>>into
>>account when calculating the layout of GridLayout. I see that snippet 175
>>claims to be able to do this by setting GridData.exclude to true.
>>However,
>>I am using SWT version 3.0, and the GridData class does not appear to have
>>this member. Which version of SWT do need to get this behavior.
>>
>>The relevant code from snippet 175 is as follows:
>>
>> final Button bHidden = new Button(shell, SWT.PUSH);
>> bHidden.setText("Button 1");
>> GridData data = new GridData();
>> data.exclude = true;
>> data.horizontalSpan = 2;
>> data.horizontalAlignment = SWT.FILL;
>> bHidden.setLayoutData(data);
>>
>>Thanks.
>>
>>
>
>
>
Re: Which version of SWT required for snippet 175... [message #451324 is a reply to message #451310] Fri, 25 February 2005 17:39 Go to previous message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Tom Schindl wrote:
> I don't want to insist on this topic but I've posted yesterday a
> proposal to the SWT-List. About creating an own snippet-page where all
> those things like SWT-Version, ... are covered.
>
> Maybe someone could point me to a place where I should ask about this.
> On swt-Mailling list I didn't get any feedback.
>
> For all those not reading the swt-maillinglist here is what I thought
> about snippets-page:
>
> http://codesnippets.services.openoffice.org/Writer/Writer.Ch angeDocumentBackgroundColor.snip

I wouldn't want to see anything that made more work for the
contributors. The version problem can be solved with a comment in the
code, which is a good place for it.

Bob Foster
Previous Topic:Eclipse 3.1 M5 - Browser.execute() - how to access JavaScript variables ?
Next Topic:SWT equivalent of Swing Spinner widget...
Goto Forum:
  


Current Time: Fri Apr 19 22:11:48 GMT 2024

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

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

Back to the top