There doesn't seem to be a way to get the entered text from a editable combobox. Control.value returns a list item if one has been added to drop down portion. But not the editable part from what I can see. Sorry if I overlooked how this is done in the documentation.
Thanks for the report, it's supposed to be available from Control.value.name but seems not to work. We'll fix this in the next update.
Now, the value cannot be set for a combo edit.
Example ---> Set combobox edit test.dcf (2.3 KB)
Trying to call the GetItemByName method with a combobox, I get the following error.
Object doesn't support this property or method (0x800a01b6)
Example --->combo1.GetItemByName() Error.dcf (2.4 KB)
Thanks, we'll fix that in the next version. You'll be able to use the Control.label
property to set the edit text for a combo.
Actually, this is a documentation error - the method is actually called GetItemByLabel
. We'll add GetItemByName
as a synonym in the next update.
Opus 12.6, javascript. The label
property doesn't seem to work.
Can you show us your script code?
Here it is:
CJ6B7SB7.dcf (9.7 KB)
Error:
08.07.2017 20:42 Error at line 22, position 4
08.07.2017 20:42 A method was called unexpectedly (0x8000ffff)
It looks like the combo edit control text needs to be read before the dialog has closed. (No longer true with newer versions of Opus.)
RandomNames_Leo.dcf (11.0 KB)
Changes I made,
- Set the dialog's button so it doesn't close the dialog automatically:
- Diffs of the script code:
Perfect!! Thanks.
Not quite perfect.
@Leo, the val_min restriction doesn't work for UpDown control:
<control halign="center" height="13" name="Lenght" number="yes" type="edit" updown="yes" val_min="3" width="34" x="318" y="20" />
Full script please. Preferably in a new thread as this one is about Drop-down Edit Comboboxes not UpDown controls.
Fixed in the next update.