[Gambas-user] Combo box

richard terry rterry at ...1946...
Thu Mar 12 21:35:28 CET 2009


On Fri, 13 Mar 2009 12:46:05 am Jeff wrote:
> Hi All,
> First post, so forgive me newbie-ness.
>
> If I use the add method to add rows to a combo box I specify an index:
> Eg:
> ComboBoxProjects.Add("ZZ", 0)
> ComboBoxProjects.Add("AA", 1)
>
> Then in a button click event I use the index property to get the
> selected row:
>
> PRINT ComboBoxProjects.Index
>
> This is fine until I set the sort property to true on the combo box. The
> order of the text changes but the index remains the same, so selecting
> the AA row gives me an index of 0, not 1 as expected.
>
> Any ideas? What am I doing wrong?
No, I doubt it, this is the annoying thing about a combo box - it dosn't 
matter what you put in the index, gambas will label them 0-n

I've struggled with the same problem as I wanted to use database keys as the 
indexes.

perhaps we are both doing something wrong.

richard

>
> I am using Gambas 2.7.1 on Ubuntu Ibex
>
>
>
>
> ---------------------------------------------------------------------------
>--- Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user






More information about the User mailing list