Vcl.DockTabSet.TDockTabSet.AutoSelect
Delphi
property AutoSelect: Boolean read FAutoSelect write FAutoSelect default False;
C++
__property bool AutoSelect = {read=FAutoSelect, write=FAutoSelect, default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | Vcl.DockTabSet.pas Vcl.DockTabSet.hpp |
Vcl.DockTabSet | TDockTabSet |
Description
Determines whether the control is automatically selected when it gets focus.
When this property is set to True the runtime behavior is that a tab on the control gets focus and is selected when the user moves the mouse pointer over the tab. If you want to test this, create a simple form application, drop a TDockTabSet control onto the form, set the TStrings of the Tabs property to foo and bar, set AutoSelect to True, then add the following code to an OnClick event:
procedure TForm1.DockTabSet1Click(Sender: TObject);
var whichTab: string;
begin
if DockTabSet1.TabIndex = 1 then
whichTab := 'bar'
else
whichTab := 'foo';
ShowMessage('Clicked '+ whichTab);
end;