> ComboBox.Find (gb.qt)
> Syntax
> 
> FUNCTION Find ( Item AS String ) AS Integer
> 
> Finds an element in the poup list box and returns its index, or -1 if the
> element cannot be found.
> 
> 
> This appears to be case sensitive which is a pity.
> 
> I wonder if it would be possible to have a flag in this routine to search 
>  for case sensitive/non sensitive
> 
> Regards
> 
> Richard
> 

You must do it yourself:

Sub Find(hCombo As ComboBox, Item As String) As Integer

  Dim iInd as integer

  For iInd = 0 to hCombo.Count - 1
   If String.Comp(hCombo[iInd].Text, Item, gb.IgnoreCase) = 0 then return iInd
  Next

  Return -1

End

-- 
Benoît Minisini

------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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-12, 2009. Register now!
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