Never mind I found it.

'-----------------------------
---------------------------------------------------------------------------
PUBLIC FUNCTION multipleSelections(targetLB AS ListBox) AS String
 DIM targetCount AS Integer
 DIM foundSelected AS Integer
 DIM Res AS String

 targetCount = 0
 foundSelected = 0
 DO WHILE targetCount < targetLB.Count
  IF targetLB[targetCount].selected = TRUE THEN
   Res &= targetLB[targetCount].Text & "|"
   INC foundSelected
  ENDIF
 INC targetCount
 LOOP

IF foundSelected = 0 THEN
   RETURN "Nothing found"
 ELSE
   RETURN Left(Res, Len(Res) - 1)
ENDIF

END
'--------------------------------------------------------------------------------------------------------




On Tue, Sep 22, 2009 at 11:06 AM, Dan Sheffner <mess...@digisoftinc.org>wrote:

> I want all selected values from the listBox.
>
>
> On Tue, Sep 22, 2009 at 11:04 AM, Dan Sheffner <mess...@digisoftinc.org>wrote:
>
>> Can someone please give me the code to loop through a listBox and put all
>> values into a string array?
>>
>> I would think this would be very straight forward but I'm having a very
>> hard time finding any documentation on this or an examples.
>>
>> Thanks in advance.
>>
>> ~Dan
>>
>
>
------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to