There is no way to programaticaly select which item in
a combobox is displayed in the edit line.
Selecting an item draws a dotted line around it, but
does not show it in the edit line.
can we beef up the select method to change the
displayed item OR have an ~EnsureVisible or ~Show
method or some such to put a particular item in the
Edit Line.
Thanks,
Jon
Anonymous
Logged In: YES
user_id=191588
Originator: NO
Jon,
I worked with OODialog, and liked it - about 8 years ago. I'm kind of rusty with it now. If you would attach a simple program that has a combo-box and give a brief description of what you would like to do, I'll take a look at implementing it.
Logged In: YES
user_id=191588
Originator: NO
Jon,
I worked with OODialog, and liked it - about 8 years ago. I'm kind of rusty with it now. If you would attach a simple program that has a combo-box and give a brief description of what you would like to do, I'll take a look at implementing it.
Logged In: YES
user_id=667060
Originator: YES
Hi Mark,
well I've learnt something (obvious). You can of course select an item in a combo box by setting the apropriate attribute & doing a setData, but sometimes you want to affect one control without affecting all the rest, so instead of doing
self~comboValue = 'Green'
self~setData
I would like to do:
ComboBox~select('Green')
or
ComboBox~selectIndex(4)
SetData can be destuctive to other controls sometimes, for instance if you have a tree control with non unique leaves, like this heirachy of books & chapters:
1 Pest Control In the Antartic
2 Introduction
3 Killing big pests
4 Killing Medium Pests
5 Killing Small Pests
6 Acknowledgements
7 Object Oriented programming Guide
8 Introduction
9 Dont be faint hearted
...
If you have leaf 8 selected and you perform a setData leaf 2 will become selected instead.
I hope thats clearer,
Jon
File Added: comboProb.rex
Logged In: YES
user_id=191588
Originator: NO
Jon,
I've been meaning to close this for a long time. In the interest of cleaning things up I'm closing it now.
You say:
"so instead of doing
self~comboValue = 'Green'
self~setData
I would like to do:
ComboBox~select('Green')
or
ComboBox~selectIndex(4)
You can in fact do exactly what you want to do. The only thing I can think of is that maybe when you opened this you were not tuned in yet to the what that some things only work when the underlying control has actually been created. If you do what you want in initDialog() it will work.
If course you also need to use either self~noAutoDetection or:
::method initAutoDetection
self~noAutoDetection