RAD Studio VCL Reference
|
Determines whether the tabs can appear on more than one row.
property MultiLine: Boolean;
__property Boolean MultiLine;
Use MultiLine to determine how the tabs are displayed. If MultiLine is true, the tabs are displayed on more than one row when the number of tabs exceeds the number that fits across the top of the tab control. How many rows is determined by how many tabs are in the tab control. If MultiLine is false, the tabs are displayed on one row only, and the user must scroll the displayed scroll arrows to view all the tabs.
C++ Examples:
/* This example requires a PageControl with no pages created, and a TCheckBox. During the form create, a series of tabs will be created on the Page Control that exceed the Page Control's width. When the Check Box control is clicked, the setting of the MultiLine property is toggled, alternately stacking the tabs vertically, or along a single line horizontally. */ void __fastcall TForm1::CheckBox1Click(TObject *Sender) { PageControl1->MultiLine = CheckBox1->Checked; } void __fastcall TForm1::FormCreate(TObject *Sender) { CheckBox1->Caption = "Stack Tabs?"; for (int i = 0; i < 20; i++) { TTabSheet *pPage = new TTabSheet(PageControl1); // PageControl1 is the parent, so it will clean up. pPage->PageControl = PageControl1; pPage->Caption = AnsiString("Page") + IntToStr(i); } }
Delphi Examples:
{ This example requires a PageControl with no pages created, and a TCheckBox. During the form create, a series of tabs will be created on the Page Control that exceed the Page Control's width. When the Check Box control is clicked, the setting of the MultiLine property is toggled, alternately stacking the tabs vertically, or along a single line horizontally. } procedure TForm1.CheckBox1Click(Sender: TObject); begin PageControl1.MultiLine := CheckBox1.Checked; end; procedure TForm1.FormCreate(Sender: TObject); var i: Integer; begin Checkbox1.Caption := 'Stack Tabs?'; for i := 0 to 20 do with TTabSheet.Create(Self) do begin PageControl := PageControl1; Caption := 'Tab #' + IntToStr(i); end; end;
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|