Hello,
I'm using a combobox using the layer style in a palette. Since the palette is modeless, the user can add another layer or purge existing layers. But unfortunately the combobox does not recognize this at runtime of the form, the palette must be closed and re-opened to get the current list and the current layerstates. Is there a way to update the list at runtime?
Fred
The Clear method should reset the content. In the pre-populated combos, that means it will clear and repopulate them.
So I guess a VLisp reactor is neaded?
We spoke breifly about this a while back: OpenDCL's inabilitity to detect changes in the drawing database. Would be nice if there was a way to have an indicator in changes where modeless forms could "react" to changes in the drawing database.
Like: dcl_OnDocActivated
Maybe: dcl_OnDatabaseChanged
data passed would only need to be table or dictionary name that had been changed - then our code could react accordingly.
jb
Hello,
>> dcl_OnDatabaseChanged
Is it really a good idea? Because even zooming changes the database. Whenever new elements are created this event would fire, too.
Fred
Quote from: owenwengerd on July 23, 2010, 06:43:27 AM
The Clear method should reset the content. In the pre-populated combos, that means it will clear and repopulate them.
Thanks, Owen, that did the trick. Even the current selection will be kept. I'm overwhelmed.
I solved this using DropDown event. For the textstyle combobox style I solved that by assigning a new list:
(defun c:survey_sc_height_plan_cbb_layer_OnDropDown (/) (dcl_combobox_clear survey_sc_height_plan_cbb_layer))
(defun c:survey_sc_height_plan_cbb_style_OnDropDown (/)
(dcl_control_setlist survey_sc_height_plan_cbb_style (GET_TEXTSTYLES_EX))
(dcl_Combobox_selectstring survey_sc_height_plan_cbb_style (if (tblsearch "STYLE" (cdr (assoc "STYLE" lstData))) (cdr (assoc "STYLE" lstData)) (getvar "TEXTSTYLE")))
); c:survey_sc_height_plan_cbb_style_OnDropDown
Fred
Quote from: owenwengerd on July 23, 2010, 06:43:27 AM
The Clear method should reset the content. In the pre-populated combos, that means it will clear and repopulate them.
Owen, it doesn't belong at least to my initial post but why there is a gray selection in layer style combobo when focus is off from this control?
Fred
Quote from: jb on July 23, 2010, 07:40:52 AM
We spoke breifly about this a while back: OpenDCL's inabilitity to detect changes in the drawing database. Would be nice if there was a way to have an indicator in changes where modeless forms could "react" to changes in the drawing database.
I'm concerned about a performance penalty with this approach.
Quote from: Fred Tomke on July 23, 2010, 09:05:07 AM
Owen, it doesn't belong at least to my initial post but why there is a gray selection in layer style combobo when focus is off from this control?[/quote]
I don't know. Is it consistent between Windows versions? If you think it's a bug, I'll have a closer look.