ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Split.AllowFocus Property

Gets or sets a value indicating whether the split can recive focus.

[Visual Basic]

Public Property AllowFocus As Boolean

[C#]

public bool AllowFocus {get;set;}

[Delphi]

public property AllowFocus: Boolean read get_AllowFocus write set_AllowFocus;

Remarks

If True (the default), the user will be able to interactively select the object, giving it focus.

If False, the user will not be able to interactively select the object. When clicked, the object will not receive focus and the control (or grid column) that previously had focus will retain it.

For C1DisplayColumn objects, setting AllowFocus to True enables cells within the object to receive focus. If set to False, there is no way to change the focus to a cell within the object. However, if an object already has the focus, setting AllowFocus to False will not give focus to another split, column, or control.

If a cell in a column which does not allow focus is clicked, and the cell is in a row other than the current row, then the row is changed, but the column with the focus retains it.

Example

The following code restricts the second split from receiving focus:

·      Visual Basic

       Me.C1TrueDBGrid1.Splits(1).AllowFocus = False

·      C#

       this.c1TrueDBGrid1.Splits[1].AllowFocus = false;

·      Delphi

       Self.C1TrueDBGrid1.Splits[1].AllowFocus := False;

See Also

Split Class | Split Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.