OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Shade on April 15, 2008, 10:02:57 AM

Title: OnSelChange Variables?
Post by: Shade on April 15, 2008, 10:02:57 AM
I am still learning ODCL and I am little confused about the following command;

(defun c:DScale_DScale_Set_ComboBox_OnSelChanged (nSelection sSelText /)
     (dcl_MessageBox "To Do: code must be added to event handler\r\nc:DScale_DScale_Set_ComboBox_OnSelChanged" "To do")
)


What does the nSelection sSelText pertain to in the code?

Any help is appreciated... 8)
Title: Re: OnSelChange Variables?
Post by: jb on April 15, 2008, 10:25:48 AM
nSelection is the index of the selected item - i.e. it's numeric location in the comboBox
sSelText is the TextString of the selected Item

This is useful when you want the users interaction with the comboBox to change values of other controls on the form.  If you have a comboBox that lists Xrefs and when it changes you want to update a label control that shows the path, those values can be sent to a sub to obtain the path and update the control.
Title: Re: OnSelChange Variables?
Post by: Shade on April 15, 2008, 11:13:17 AM
Thanks for the help, I understand now.