00 Votes

Delphi: Insert TabSheet at first position of PageControl

Question by Guest | 2013-10-22 at 22:24

I have a TPageControl on my Form and I am adding some new TabSheets during the runtime of my program to this PageControl dynamically. All of this is working fine, but I also would like to determine the position of the tab sheet. Because, currently, the new tabs are always inserted at the last position of the tab and I would like to have them at the first position.

So, how is it possible to create a new tab and insert it directly to the first place of a PageControl?

1Best Answer1 Vote

Each TTabSheet has the property "PageIndex", which indicates the position at which the tab sits on the PageControl. If you set the PageIndex of your tab to 0, it will be inserted at the first place, if you set it to 1, it would be the second position and so on.
2013-10-24 at 10:34

ReplyPositive Negative

Related Topics

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.


Ask your own question or write your own article on askingbox.com. That’s how it’s done.