ObjectDCL Banner

Grid_ShowComboBox Method

Description

This method will activate a combo box to edit a cell. The style argument accepts a numeric value that indicated the style of the drop down list to be used. The values are as shown below:

  • 18 - DropDown
  • 19 - ArrowHeads
  • 20 - Acad Colors
  • 21 - TextStyle List
  • 22 - PlotStyle Names
  • 23 - PlotStyle Tables
  • 24 - Plotter List
  • 25 - Fonts
  • 26 - Drive List
  • 27 - Layer List
  • 28 - DimStyle List
  • 36 - Strings Combo
  • 37 - AngleUnits Combo
  • 38 - Integers Combo
  • 39 - Units Combo
  • 40 - UpperCase Combo
  • 41 - LowerCase Combo

Parameters

MyControlReference
Reference to the control in the form of MyProject_MyForm_MyControl.
ProjectFile
String identifying the project as it was passed in LoadProject.
DialogName
String identifying the dialog by name.
ControlName
String identifying the control by name.
nRowIndex
Integer specifying row index.
nColIndex
Integer specifying column index.
nStyle
Integer specifying the style.
sChoiceValueX
String specifying the text of the choice.

Return Values

Returns the following according to the situation:

  • T when successful.
  • Nil if the control is not found, does not support this function or if there is no such row or column.

AutoLISP Syntax

The recommended convention is passing the control identifier directly:

CopyCode imageCopy Code
(Odcl_Grid_ShowComboBox 
		MyControlReference [as Reference]
		nRowIndex [as Integer]
		nColIndex [as Integer]
		nStyle [as Integer]
		(list
			sChoiceValue1 [as String]
			sChoiceValue2 [as String]
			...
			sChoiceValueN [as String]
		)
	)

An alternative convention is to identify the control by providing the project file, the dialog name and the control name:

CopyCode imageCopy Code
(Odcl_Grid_ShowComboBox
		ProjectFile [as String]
		DialogName [as String]
		ControlName [as String]
		nRowIndex [as Integer]
		nColIndex [as Integer]
		nStyle [as Integer]
		(list
			sChoiceValue1 [as String]
			sChoiceValue2 [as String]
			...
			sChoiceValueN [as String]
		)
	)

Remarks

If the style does not match the pre-assigned value for the cell or column, then the pre-assigned value will be used.

Applies For

EditableGrid.

Example

CopyCode imageCopy Code
; Show the combobox with the specified choices on the fourth column of the third row
(Odcl_Grid_ShowComboBox MyProject_MyForm_MyControl 2 3 25 
	(list "Arial" "Times New Roman"))

See Also

Grid_ShowEllipsesButton, Grid_ShowImageComboBox, Grid_ShowItemDlg, Grid_ShowPickButton, Grid_ShowTextBox