Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Storing data in TreeItem
Storing data in TreeItem [message #455094] Fri, 06 May 2005 08:13 Go to next message
Eclipse UserFriend
Originally posted by: akan.aiqa.com

Hi,

Briefly: Can I store an object in a TreeItem ?

I want to get the unique id of the TreeItem selected by the user so I
want to store a number and the text (displayed in the TreeItem) in a
simple object.

For example when user selects "Car" I want to get the value "12" which
is a values of the primary key field in the table of vehicles.

thanks,
aiQa
Re: Storing data in TreeItem [message #455095 is a reply to message #455094] Fri, 06 May 2005 08:28 Go to previous messageGo to next message
Konstantin Scheglov is currently offline Konstantin ScheglovFriend
Messages: 555
Registered: July 2009
Senior Member
aiQa :

See setData(key, value) in Widget

> Hi,
>
> Briefly: Can I store an object in a TreeItem ?
>
> I want to get the unique id of the TreeItem selected by the user so I
> want to store a number and the text (displayed in the TreeItem) in a
> simple object.
>
> For example when user selects "Car" I want to get the value "12" which
> is a values of the primary key field in the table of vehicles.
>
> thanks,
> aiQa


--
SY, Konstantin.
Advanced Eclipse SWT Designer (http://www.swt-designer.com)


Konstantin Scheglov,
Google, Inc.
Re: Storing data in TreeItem [message #455099 is a reply to message #455095] Fri, 06 May 2005 12:32 Go to previous message
Eclipse UserFriend
Originally posted by: akan.aiqa.com

Konstantin Scheglov wrote:
> aiQa :
>
> See setData(key, value) in Widget

thanks,

Because setData, getData methods are inherited from widget class every
widget can store an object. This is excellent. I haven`t looked at the
inherited methods section in the api documentation so did`t see these
emthods.

aiQa
Previous Topic:listener for visibility
Next Topic:Table and deprecated setImageIndent
Goto Forum:
  


Current Time: Thu Apr 25 19:30:58 GMT 2024

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

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

Back to the top