HeaderPane
Main
Hide

SftButton/OCX 4.0 - ActiveX Button Control

Share Link
Print

AllowFocus Property, SftButton Object

Defines whether the control can receive the input focus.

Syntax

Get

VB.NETBoolean = object.AllowFocus As Boolean
VBBoolean = object.AllowFocus As Boolean
C#.NETbool Boolean = object.AllowFocus;
VC++VARIANT_BOOL Boolean = object->AllowFocus;
VARIANT_BOOL Boolean = object->GetAllowFocus();
CHRESULT object->get_AllowFocus(VARIANT_BOOL* Boolean);

Put

VB.NETobject.AllowFocus = Boolean As Boolean
VBobject.AllowFocus = Boolean As Boolean
C#.NETbool object.AllowFocus = Boolean;
VC++VARIANT_BOOL object->AllowFocus = Boolean;
void object->PutAllowFocus(VARIANT_BOOL Boolean);
CHRESULT object->put_AllowFocus(VARIANT_BOOL Boolean);

object

A SftButton object.

Boolean

Defines whether the control can receive the input focus.

BooleanDescription
TrueThe control will receive the input focus when the user clicks on it.
FalseThe 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.

See Also SftButton Object | Object Hierarchy


Last Updated 08/23/2026 - (email)
© 2026 Softel vdm, Inc.