RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDockTabSet.AutoSelect Property

Determines whether the control is automatically selected when it gets focus.

Pascal
property AutoSelect: Boolean;
C++
__property Boolean AutoSelect;

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 a 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;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!