
This method adds columns to a EditableGrid control. Complete control of each column has been provided with this method, the width, justification, and optional image from the image list can or must be specified for each control. Because this method asks you to specify the insertion index, columns don't have to be added at the end, but if necessary can be added in the beginning or the middle of the existing columns.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_Grid_AddColumns MyControlReference [as Reference] (list (list nColIndex [as Integer] sColText [as Integer] nJustification [as Integer] nColWidth [as Integer] [Optional] nImageListIndex [as Integer]) (list nColIndex [as Integer] sColText [as Integer] nJustification [as Integer] nColWidth [as Integer] [Optional] nImageListIndex [as Integer]) ... ) ) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_Grid_AddColumns ProjectFile [as String] DialogName [as String] ControlName [as String] (list (list nColIndex [as Integer] sColText [as Integer] nJustification [as Integer] nColWidth [as Integer] [Optional] nImageListIndex [as Integer]) (list nColIndex [as Integer] sColText [as Integer] nJustification [as Integer] nColWidth [as Integer] [Optional] nImageListIndex [as Integer]) ... ) ) |
Because the EditableGrid control was design exclusively for Internet Explorer, the justification for the first column will only display left justification. We wish this design intent of Microsoft's was not so, but unfortunately this is how Microsoft provides the control.
Please create lists as follows using the list keyword:
(list (list x y ...) (list x y ...) ...)
It seems that ObjectARX does not always handle lists created as follows:
'(x y ...) (x y ...) ...
Copy Code |
|---|
; Define columns (Odcl_Grid_AddColumns MyProject_MyForm_MyControl (list (list 0 "Name" 0 150 0) (list 1 "Home Phone" 2 80) (list 2 "Work Phone" 2 80) ) ) |
Grid_CalcColWidth, Grid_DeleteColumn, Grid_GetColumnCount, Grid_GetColumnImage, Grid_GetColumnItems, Grid_GetColWidth, Grid_SetColumnImage, Grid_SetColWidth, Grid_SortNumericItems, Grid_SortTextItems