Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Combo problem
Combo problem [message #455164] Mon, 09 May 2005 13:35 Go to next message
Eclipse UserFriend
Originally posted by: akan.aiqa.com

I can not store a data object for every combo item. What do you suggest
me to do to store key field of the table as well as name field ?

(Because there are records with the same name but having different key
values)

thanks,
aiQa
Re: Combo problem [message #455189 is a reply to message #455164] Tue, 10 May 2005 05:02 Go to previous message
Eclipse UserFriend
Originally posted by: akan.aiqa.com

aiQa wrote:
> I can not store a data object for every combo item. What do you suggest
> me to do to store key field of the table as well as name field ?
>
> (Because there are records with the same name but having different key
> values)
>
> thanks,
> aiQa

I will answer my own question :)

I created an object named ComboData and stored some string values in it.
Then created an ArrayList<ComboData> assign it to combo with setData()
method. I used setText() method of combo in a loop of ArrayList items so
when a user clicks 3th item in the combo I select 3th item in the
ArrayList and read extra data stored in the ComboData object.

I wish to hear if there is a better solution.
Previous Topic:Disposing of the parent when the children are disposed
Next Topic:Changing the font size in the JFace MessageDialog
Goto Forum:
  


Current Time: Wed Sep 25 16:24:05 GMT 2024

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

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

Back to the top