[Gambas-user] Using ComboBoxes

Fabien Bodard gambas.fr at ...626...
Tue Nov 6 17:40:49 CET 2012


Use a side  collection.

Dim aCol as Collection = ["AAA":1,"BBB":2,"CCC":3]


Value = aCol[ComboBox1.Text]


2012/11/6 Bill-Lancaster <bill-lancaster at ...2231...>

>
> If the data loaded into a ComboBox is random ie:;
>
> ComboBox1.Add("BBB")
> ComboBox1.Add("AAA")
> ComboBox1.Add("CCC")
> And these string vales have associated values (perhaps a record Id), say
> 5,8,7
> Then for convenience the ComboBox is sorted, how can the numeric values
> best
> be retrieved?
>
> I usually find a way round this but perhaps there is a simple and elegant
> solution that I've been blind to!
>
> --
> View this message in context:
> http://old.nabble.com/Using-ComboBoxes-tp34648008p34648008.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Fabien Bodard



More information about the User mailing list