Click to See Complete Forum and Search --> : PostMessage
alexK
February 11th, 2000, 02:03 PM
All the CB_ messages that work fine with regular comboBoxes are useless with DataCombo. Particularly I was trying to use CB_SETCURSEL.
Is there a way to do this?
Thanks!
Alex!
Johnny101
February 12th, 2000, 04:08 PM
I assume that you want to make sure that a certain item in the list is visible? I dont really use the datacombo control, but i use the listindex property of the regular control all the time to automatically set the selection. Could you do something like that?
DBCombo1.SelectedItem = DBCombo1.List(index)
Hope this applies/helps,
John
John Pirkey
MCSD
www.ShallowWaterSystems.com
alexK
February 12th, 2000, 04:29 PM
Good idea! Thanks! However the .List and .ItemSelected properties are not available for DataCombo1 (not DBCombo1).
DataCombo1 is ADO thing. The only thing I can do is to change .Text property. This will triger
change event. Hovewer the selected item will only
change if I would say something like:
DataCombo1.Text = 5
And this wouldn't work.
lVal = 5
DataCombo1.Text = lVal
Almost like it consider 5, lVal as objects. It can find 5 and not lVal. Do you know how to go arraund this?
Thank you!
Alex!
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.