I have a Layer Combo Box (style 13), and every time I start the dialogue the layer list is "doubled" - after three starts of dialogue I have 3 times Layer 0, 3 times layer Defpoints, .....
At the moment I don't see where it is coming from - the only code which is related to the list is
a) where I select an entry from the list and save the value
b) select an entry based of an existing value.
The detection of the layer is done by OpenDCL.
(setq lst_layer (dcl-ComboBox-GetLBText Formator/main/lst_layer (dcl-ComboBox-GetCurSel Formator/main/lst_layer)))
......
(if (and lst_layer
(tblsearch "layer" lst_layer))
(dcl-ComboBox-SetCurSel Formator/main/lst_layer (dcl-ComboBox-FindString Formator/main/lst_layer lst_layer))
(dcl-ComboBox-SetCurSel Formator/main/lst_layer 0)
)
Hi,
I already faced this problem before so you can clear the comboBox at the start up to avoid duplicates with the use of function: dcl-ComboBox-Clear
Quote from: Tharwat on June 10, 2016, 10:15:55 AM
... with the use of function: dcl-ComboBox-Clear
I will try, but at the moment I have to search the right place for the code: when loading, when closing, ....
Quote from: Peter2 on June 10, 2016, 12:09:42 PM
I will try, but at the moment I have to search the right place for the code: when loading, when closing, ....
Quote from: Tharwat on June 10, 2016, 10:15:55 AM
you can clear the comboBox at the start up to avoid duplicates ..........
It's a bit of a risky change that could have unintended consequences, but I think this is now fixed for the next build.