[Gambas-user] ComboBox returning wrong index

richard terry rterry at ...1946...
Thu Feb 5 21:34:07 CET 2009


Build 1844.

ComboBox.Add (gb.qt)
Syntax
SUB Add ( Item AS String [ , Index AS Integer ] )
 Inserts an element in the popup list box. 

One would assume the following:
1) Don't provide an index Gambas sets 0,1,2 etc
2) Do provide an index  you should be able to set index
   to what you want

I've never noticed before but that dosn't occur. No matter what you set the 
index to, it is always auto-incremented.

I noticed this because I had a combo box, which had its contents changed 
according to the value of an option box, and as the index, I'd used the key 
to a database table containing the information I wanted to display/save

Hope this is fixable. i can obviously do a work around.

Maybe I'm just misinterpeting the documentation.

regards

Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_cmb_index-0.0.1.tar.gz
Type: application/x-tgz
Size: 7737 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20090206/daf56cd6/attachment.bin>


More information about the User mailing list