Pergunta

After runtime creation of new tabs, I see that last tab is overlapped by system [<] and [>] buttons in the tab header area. How to scroll this area to the rightmost position? Img from one c++ app which looks same as my app. Delphi 7.

tab area

Foi útil?

Solução

If you don't select the new created TabSheet you can use ScrollTabs with e.g. PageCount as delta, since the PageControl will scroll as far as possible if the delta exceeds the possible range.

   PageControl.ScrollTabs(PageControl.PageCount);

If you want to select the created TabSheet and scroll to the rightmost position you just need to set the ActivePageIndex:

   PageControl.ActivePageIndex :=  PageControl.PageCount - 1;
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top