Skip to content

pbFocusSubItems - cCJGrid

Determines if individual cells can be selected via keyboard navigation

Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None

Syntax

Property Boolean pbFocusSubItems
Access Type Syntax
Read Access: Get pbFocusSubItems to BooleanVariable
Write Access: Set pbFocusSubItems to BooleanVariable/Value

Description

pbFocusSubItems determines if grid navigation is supported at the row level or at the row by column level. When true, the default, pbFocusSubItems allows you to navigate within a row. The current focus column is obtained by calling SelectedColumn. When false, only row navigation is supported and SelectedColumn always returns -1.

It is possible to edit cells when pbFocusSubItems is false. Since you cannot navigate to these cells with the keyboard, you must start edit mode with the mouse. pbEditOnClick determines if a single or double click will start the edit mode. Typically, you will not want to be able to edit cells when pbFocusSubItems is false and this can be disabled by setting pbReadOnly to False or setting pbAllowEdit to False.

When pbFocusSubItems is false, you may want some way of marking the current row. The property pbShowRowFocus can be used to display a dotted force rectangle around the current row. Alternately, you can enable single item row selection by setting pbSelectionEnable to True and pbMultipleSelection to False. The selected row color can be controlled with piHighlightBackColor, piHighlightForeColor, piSelectedRowBackColor and piSelectedRowForeColor.

A typical read-only grid might be set with the following properties:

Set pbFocusSubItems to False
Set pbReadOnly to True
Set pbSelectionEnable to True