SftButton/OCX 2.5

SftButton.AllowFocus Property

Softel vdm, Inc.

Defines whether the control can receive the input focus.

Syntax       

Get

VB.NET

Boolean = object.AllowFocus  As Boolean

VB

Boolean = object.AllowFocus  As Boolean

C#.NET

bool Boolean = object.AllowFocus;

VC++

VARIANT_BOOL Boolean = object->AllowFocus;
VARIANT_BOOL Boolean = object->GetAllowFocus();

C

HRESULT object->get_AllowFocus(VARIANT_BOOL* Boolean);

Delphi

Boolean := object.AllowFocus   : WordBool;

Put

VB.NET

object.AllowFocus = Boolean  As Boolean

VB

object.AllowFocus = Boolean  As Boolean

C#.NET

bool object.AllowFocus = Boolean;

VC++

VARIANT_BOOL object->AllowFocus = Boolean;
void object->PutAllowFocus(VARIANT_BOOL Boolean);

C

HRESULT object->put_AllowFocus(VARIANT_BOOL Boolean);

Delphi

object.AllowFocus := Boolean   : WordBool;

object

A SftButton object.

Boolean

Defines whether the control can receive the input focus.

Boolean

Description

True

The control will receive the input focus when the user clicks on it.

False

The control will not receive the input focus when the user clicks on it.

Comments

The AllowFocus property defines whether the control can receive the input focus.

Setting AllowFocus to False has no effect when used with .NET. The ShowFocus property can be used to suppress the display of the focus rectangle instead.

By setting this property to False, the control will not receive the input focus, even when the user clicks on the control. This is usually used for controls on tool bars or other modeless windows. To make sure that the control cannot be reached using the keyboard, the control cannot be a valid tab stop. For example, when using Visual Basic, the TabStop property should be set to False. Visual C++ users should make sure the WS_TABSTOP window style is not defined.

If the AllowFocus property is set to False, the control does not support accelerator keys.


Feedback / comments / error reports for this topic
© 2008 - Softel vdm, Inc. - www.softelvdm.com