ObjectDCL Banner

OnSelChanged Event

Description

Indicates that the selection has been changed.

Parameters

nSelection
Integer identifying the index of the selected item for single selection mode. The value is the same as the value returned by ListBox_GetCurSel.
Integer identifying the number of selected entries for multiple selection mode. The value is the same as the value returned by ListBox_GetSelCount.
sSelText
String identifying the selected item's text. Empty string when multiple selection mode is set.

AutoLISP Syntax

The event handler takes this generic form:

CopyCode imageCopy Code
(defun c:FormName_ControlName_OnSelChanged 
                 (nSelection [as Integer] sSelText [as String] /)
     
)

Applies For

DwgList.

Example

CopyCode imageCopy Code
; React to the change in the selection
(defun c:MyForm_MyControl_OnSelChanged
                 (nSelection sSelText /)
     (princ "OnSelChanged(")
     (princ nSelection)
     (princ ", ")
     (princ sSelText)
     (princ ")\n")
)

See Also

OnSelChanged (ComboBox), OnSelChanged (EditableGrid), OnSelChanged (CustomFileDlg), OnSelChanged (ImageCombo), OnSelChanged (ListBox), OnSelChanged (MonthPicker), OnSelChanged (OptionList), OnSelChanged (TreeControl)