I'm sure there is an existing, obvious function in OpenDCL, but at the moment I'm blind to see it ...
- I have a ComboBox with some entries: (list "Jim" "John "Sue "Anne")
- Somewhere in Lisp there is: (setq myvalue "Sue")
-> How to use "dcl_ComboBox_SetCurSel" with "Sue"?
I use "vl-position", but I'm sure there is a better way:
(dcl_ComboBox_SetCurSel haupt_cbxModus (vl-position selMode (dcl_Control_GetList haupt_cbxModus)))
Have a fine week!
The normal pattern is to either call (dcl-ComboBox-SelectString) to select the first item with matching prefix, or else (dcl-ComboBox-FindStringExact) plus (dcl-ComboBox-SetCurSel) if you need to ensure an exact match.
Quote from: owenwengerd on November 17, 2014, 07:59:41 AM
The normal pattern is to ...
Thanks. I was sure there is a simple solution :)
Quote from: Peter2 on November 16, 2014, 11:47:50 PM
I'm sure there is an existing, obvious function in OpenDCL, but at the moment I'm blind to see it ...
- I have a ComboBox with some entries: (list "Jim" "John "Sue "Anne")
- Somewhere in Lisp there is: (setq myvalue "Sue")
-> How to use "dcl_ComboBox_SetCurSel" with "Sue"?
I use "vl-position", but I'm sure there is a better way:
(dcl_ComboBox_SetCurSel haupt_cbxModus (vl-position selMode (dcl_Control_GetList haupt_cbxModus)))
Have a fine week!