Delphi/Lazarus: Change Order of TabSheets on PageControl at runtime
Tip by Delphian | 2013-10-29 at 15:55
Question: We have a TPageControl, on which there are positioned some TabSheets. At the start of the program, those tabs have a specific arrangement and we would like to change this arrangement or the order of the tabs during the runtime of our program.
Solution: Via the property PageIndex, it is possible to determine the position of each TabSheet on a PageControl.
procedure TForm1.Button1Click(Sender: TObject); begin TabSheet3.PageIndex:=0; TabSheet2.PageIndex:=1; TabSheet1.PageIndex:=2; TabSheet0.PageIndex:=3; end;
In the example, the order of the TabSheets "TabSheet0" to "TabSheet3" is reversed, so that first, "TabSheet0" is located at the first position and after running the code, "TabSheet3" is located at the first position and "TabSheet0" is at the last position.
About the Author
The author has not added a profile short description yet.
Show Profile
Related Topics
Delphi: Insert TabSheet at first position of PageControl
Question | 1 Answer
Delphi/Lazarus: Arrange PageControl-Tabs in multiple Rows
Question | 1 Answer
Delphi/Lazarus: Create TabSheet on PageControl dynamically
Tutorial | 0 Comments
Delphi/Lazarus: Show and Change Printers
Info | 0 Comments
Delphi: Show Path in Windows Explorer
Question | 1 Answer
Delphi/Lazarus: Dynamically create a Label at runtime
Tip | 0 Comments
Delphi: Start other Application
Tip | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.