🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #3494

Re: getSelectedItem() in listcontrol?

#3494
From: Joie Tagum
Date: Mon, 08 Dec 1997 00:00
16 lines
1074 bytes
Thanks, I'll try this, and go from there...

Joe Nuxoll wrote
>...  To get the Strings stored in the model, ask the model
>for the items at the list of int addresses:
>
>int[] selectedIndexes = listControl1.getSelection().getAll();
>Object[] data = new Object[selectedIndexes.length];
>for (int i = 0; i < selectedIndexes.length; i++) {
>  data[i] = listControl1.get(selectedIndexes[i]);
>  System.out.println("data at index " + selectedIndexes[i] + " = " +
>data[i]);
>}
>
> - Joe Nuxoll
Technical Details
Message-ID: <66k6l2$pb5@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34830CC3.B6DF8C40@lehigh.edu> <348323E1.EF814660@corp.borland.com> <66i1c2$bf3@forums.borland.com> <348CF712.AE5B2704@corp.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,d47e4c667b5aa1c4
X-Google-Attributes: gid1089d0,public
From: "Joie Tagum" <Jtagum@pacbell.net>
Subject: Re: getSelectedItem() in listcontrol?
Date: 1997/12/08
Message-ID: <66k6l2$pb5@forums.borland.com>
X-Deja-AN: 296685062
References: <34830CC3.B6DF8C40@lehigh.edu> <348323E1.EF814660@corp.borland.com> <66i1c2$bf3@forums.borland.com> <348CF712.AE5B2704@corp.borland.com>
X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3
Organization: None
Newsgroups: borland.public.jbuilder.java.api