Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » SWT : Button & Image
SWT : Button & Image [message #464173] Thu, 17 November 2005 23:40 Go to next message
Eclipse UserFriend
Originally posted by: mitticus.gmail.com

If I am in the constructor of a Composite, can I get the device id, and
if so, how? I want to associate a bitmap image to a button where the
control/composite is being created.
Re: Button & Image [message #464218 is a reply to message #464173] Fri, 18 November 2005 19:47 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Heh? What's a device id?

"Walter Mitty" <mitticus@gmail.com> wrote in message
news:dlj4dq$fhh$1@news.eclipse.org...
> If I am in the constructor of a Composite, can I get the device id, and
> if so, how? I want to associate a bitmap image to a button where the
> control/composite is being created.
Re: Button & Image [message #464220 is a reply to message #464218] Fri, 18 November 2005 19:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunil_kamath.nohotspammail.com

Steve Northover <steve_northover@ca.ibm.com> wrote:
> Heh? What's a device id?
>
> "Walter Mitty" <mitticus@gmail.com> wrote in message
> news:dlj4dq$fhh$1@news.eclipse.org...
>> If I am in the constructor of a Composite, can I get the device id,
>> and if so, how? I want to associate a bitmap image to a button where
>> the control/composite is being created.

Maybe he means the control handle.
Why not just use a HashMap?

--
Sunil
Re: SWT : Button & Image [message #464251 is a reply to message #464173] Sat, 19 November 2005 02:24 Go to previous messageGo to next message
Haris Peco is currently offline Haris PecoFriend
Messages: 1072
Registered: July 2009
Senior Member
Walter Mitty wrote:

> If I am in the constructor of a Composite, can I get the device id, and
> if so, how? I want to associate a bitmap image to a button where the
> control/composite is being created.
try eclipse 3.2.m3 - it support button image
Re: SWT : Button & Image [message #464265 is a reply to message #464251] Sat, 19 November 2005 13:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mitticus.gmail.com

Haris Peco wrote:
> Walter Mitty wrote:
>
>
>>If I am in the constructor of a Composite, can I get the device id, and
>>if so, how? I want to associate a bitmap image to a button where the
>>control/composite is being created.
>
> try eclipse 3.2.m3 - it support button image

The one I have supports it. Its just that I need a physical device id.
Re: Button & Image [message #464266 is a reply to message #464218] Sat, 19 November 2005 13:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mitticus.gmail.com

Steve Northover wrote:
> Heh? What's a device id?
>
> "Walter Mitty" <mitticus@gmail.com> wrote in message
> news:dlj4dq$fhh$1@news.eclipse.org...
>
>>If I am in the constructor of a Composite, can I get the device id, and
>>if so, how? I want to associate a bitmap image to a button where the
>>control/composite is being created.
>
>
>


Image

public Image(Device device,
ImageData data)

Constructs an instance of this class from the given ImageData.
Re: Button & Image [message #464344 is a reply to message #464266] Mon, 21 November 2005 20:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: sunil_kamath.nohotspammail.com

Walter Mitty <mitticus@gmail.com> wrote:
> Steve Northover wrote:
>> Heh? What's a device id?
>>
>> "Walter Mitty" <mitticus@gmail.com> wrote in message
>> news:dlj4dq$fhh$1@news.eclipse.org...
>>
>>> If I am in the constructor of a Composite, can I get the device id,
>>> and if so, how? I want to associate a bitmap image to a button
>>> where the control/composite is being created.
>>
>>
>>
>
>
> Image
>
> public Image(Device device,
> ImageData data)
>
> Constructs an instance of this class from the given ImageData.

new Image(Display.getDefault(), data);

--
Sunil
Re: SWT : Button & Image [message #464358 is a reply to message #464265] Tue, 22 November 2005 01:56 Go to previous message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
Display#getMoniters()[0].handle


This is a really bad idea, but it works if you need it.
Previous Topic:Shell Hide On Close
Next Topic:How to change text when program is running?
Goto Forum:
  


Current Time: Fri Mar 29 11:54:20 GMT 2024

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

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

Back to the top