I've got a dialog to that has combo box layer lists. this dialog also has buttons next to each combo box layer list for the user to click and open a 2nd dialog where they can set the properties to create a layer. If the exit the 2nd dialog creating the layer I want to update the combo box layer lists.
Can I do that easily? I haven't found a method for it in my search yet.
Thanks!
I solved it by closing the 1st dialog then opening the 2nd. Once the 2nd is complete I reopen the 1st and all is good.
The only trouble I had was with closing the 1st dialog and reopening was I couldn't use the Cancel event. I'm not sure why that event is called with (dcl_Form_Close psSetLayers_main {DialogStatus [as Long]}) but it was.
You can use (dcl_ComboBox_Clear) to refresh the layer list. I don't understand the problem with the cancel event. Can you describe it more clearly?
the (dcl_ComboBox_Clear works great. Thanks!
regarding the OnCancel, I had the following:
(defun c:psSetLayers_cmbbxNLWallLines_OnClicked ()(psSetLayers_CreateNewLayer"Wall Lines"))
(defun c:psSetLayers_cmbbxNLDoorLines_OnClicked ()(psSetLayers_CreateNewLayer"Door Lines"))
(defun c:psSetLayers_cmbbxNLDoorJambs_OnClicked ()(psSetLayers_CreateNewLayer"Door Jambs"))
(defun c:psSetLayers_cmbbxNLWindowLines_OnClicked ()(psSetLayers_CreateNewLayer"Window Lines"))
(defun c:psSetLayers_cmbbxNLWindowJambs_OnClicked ()(psSetLayers_CreateNewLayer"Window Jambs"))
(defun c:psSetLayers_cmbbxNLWindowGlass_OnClicked ()(psSetLayers_CreateNewLayer"Window Glass"))
(defun c:psSetLayers_cmbbxNLWindowSills_OnClicked ()(psSetLayers_CreateNewLayer"Window Sills"))
(defun c:psSetLayers_grphbtnCancel_OnClicked()(dcl_Form_Close psSetLayers_main)(setq sy%cancel_clicked T))
(defun c:psSetLayers_grphbtnCancel_OnCancel()(dcl_Form_Close psSetLayers_main)(setq sy%on_cancel_clicked T))
(defun c:psSetLayers_main_OnCancelClose(in%canceling)(dcl_Form_Close psSetLayers_main)(setq sy%close T))
(defun psSetLayers_CreateNewLayer
(st%title_suffix)
(dcl_Form_Close psSetLayers_main)
(zz^psArchitectural-CreateNewLayers st%title_suffix)
)
when one of the first 7 events were triggered was the OnCancel event was triggered after (dcl_Form_Close psSetLayers_main) in psSetLayers_CreateNewLayer.
I hope that helps.
Thanks for pointing me to: (dcl_ComboBox_Clear!