The number of pixels between a cell's edge and it's contents when it is selected.

Usage

Set_Property(OLECtrlEntID, "OLE.CellSelPadding[field; record]", Array)

Values

Array has the following structure:

PosNameTypeDescriptionDefault
<1>Selected Cell PaddingMultivalueThe padding used when the cell is selected-1
<2>Selected Record PaddingMultivalueThe padding used when the cell's record is selected, but not the cell itself-1
<3>Selected Column PaddingMultivalueThe padding used when the cell's column is selected, but not the cell itself-1

Indices

IndexDescription
fieldIndex to an existing field
recordIndex to an existing record

Remarks

The CellSelPadding property establishes the number of pixels between a cell's edge and its contents and is used only when the cell is selected. This property is useful when you need to adjust the layout of cell's based on it's state.

The property is made up of three fields with each field having the same multivalued structure:

PosNameTypeDescription
<1, 1>Left PaddingIntegerThe number of pixels between the cell's left edge and its contents
<1, 2>Top PaddingIntegerThe number of pixels between the cell's top edge and its contents
<1, 3>Right PaddingIntegerThe number of pixels between the cell's right edge and its contents
<1, 4>Bottom PaddingIntegerThe number of pixels between the cell's bottom edge and its contents

For any of the fields below, if a value is set to -1, then the system will use the next available padding. The order of preference is, Selected Cell Padding, Selected Row Padding, Selected Column Padding, and CellPadding. For example, if there is no Selected Cell Padding, then the system will use the Selected Row Padding. If there are no CellSelPadding settings at all, then the CellPadding settings are used.

Selected Cell Padding

The first field establishes the padding to be used when the cell is selected.

Selected Record Padding

The second field establishes the padding to be used when the cell's record is selected. The cell's record is considered to be selected when any other cell in that record is selected.

Selected Column Padding

The last field establishes the padding to be used when the cell's column is selected. The cell's column is considered to be selected when any other cell in that column is selected.

Example

// Force all cell's have a different padding when row is selected 
SelPadding = "" 
SelPadding<2, 2> = 11   ;// Set top padding to 11 when row is selected 
SelPadding<2, 2> = 0    ;// Remove bottom padding when row is selected 
Set_Property(@Window:".OLE_EDITTABLE", "OLE.CellSelPadding[All;All]", SelPadding)

See Also

CellAlignmentHeaderPaddingCellPadding

  • No labels