
This method will set the editing style of a single cell.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_Grid_SetItemStyle MyControlReference [as Reference] nRowIndex [as Integer] nColIndex [as Integer] nStyle [as Integer] [Optional] nData1 [as Integer] [Optional] nData2 [as Integer] [Optional] sString [as String]) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_Grid_SetItemStyle ProjectFile [as String] DialogName [as String] ControlName [as String] nRowIndex [as Integer] nColIndex [as Integer] nStyle [as Integer] [Optional] nData1 [as Integer] [Optional] nData2 [as Integer] [Optional] sString [as String]) |
For the style: 3 - Switchable Icons, the last two arguments (nData1 and nData2) that must be passed in, identify the two images from the image list that are to be used.
For the style: 15 - Date, the last argument (nData1) that can be passed in is the identifying date format. 0 through 9 are the allowable arguments.
For the style: 16 - Time, the last argument (nData1) that can be passed in is the identifying time format. 0 through 5 are the allowable arguments.
For the style: 35 - Files Cell, the last argument (sString) that can be a string identifying the file extensions to look for. If not found, "dwg;dxf" will be assumed.
The style change only governs the behavior of the cell and what happens when the user clicks on the cell.
For example if you set the style 33 - Linetype Cell, the current selection for the linetype must be correctly set in the Odcl_Grid_AddString or Odcl_Grid_AddRow functions. The item may not be changed to correctly display one of the listed items.
For example if you set the style 38 - Integers Combo, all the items to be added to the drop list must be as strings. You are responsible to ensure the correct text is added.
Copy Code |
|---|
; Update the text of the third row on the fourth column (Odcl_Grid_SetItemStyle MyProject_MyForm_MyControl "Completed" 2 3) |
Grid_GetItemCheck, Grid_GetItemData, Grid_GetItemImage, Grid_GetItemText, Grid_SetItemCheck, Grid_SetItemData, Grid_SetItemDropList, Grid_SetItemImage, Grid_SetItemText