BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TPageContol's Tabs not displaying properly

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Analian
Guest





PostPosted: Tue May 24, 2005 1:16 pm    Post subject: TPageContol's Tabs not displaying properly Reply with quote



I've got a Form with a TPageControl with 5 tabs, each of them containing
different stuff.
I've got a button and when it's clicked I do

PageControl1->TabIndex = 3;
Form1->ShowModal();

and thus I expect to see the fourth Tab of the PageControl but Only the
upper bulging part
of it is updated. The sheet itself isn't diplayed properly. I think the
sheet of the last tab
selected is diplayed while the upper bulging part is of the new tabsheet I
want to display.
Why is that? Is it a bug or I'm missing something? Thank you.


Back to top
Analian
Guest





PostPosted: Tue May 24, 2005 2:19 pm    Post subject: Re: TPageContol's Tabs not displaying properly Reply with quote



Thanks. That does the trick. But then what should I use TabIndex for??


Back to top
François Charton
Guest





PostPosted: Tue May 24, 2005 2:21 pm    Post subject: Re: TPageContol's Tabs not displaying properly Reply with quote




"Analian" <analian (AT) mail (DOT) bg> a écrit dans le message de news:
[email]42932940 (AT) newsgroups (DOT) borland.com[/email]...
Quote:
I've got a Form with a TPageControl with 5 tabs, each of them containing
different stuff.
I've got a button and when it's clicked I do

PageControl1->TabIndex = 3;
Form1->ShowModal();

and thus I expect to see the fourth Tab of the PageControl but Only the
upper bulging part
of it is updated. The sheet itself isn't diplayed properly. I think the
sheet of the last tab
selected is diplayed while the upper bulging part is of the new tabsheet I
want to display.
Why is that? Is it a bug or I'm missing something? Thank you.



TabIndex is for Tab controls, for PageControl, you should use
ActivePageIndex instead.

Francois



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue May 24, 2005 5:28 pm    Post subject: Re: TPageContol's Tabs not displaying properly Reply with quote


"Analian" <analian (AT) mail (DOT) bg> wrote


Quote:
PageControl1->TabIndex = 3;

Use the ActivePage or ActrivePageIndex property instead.


Gambit



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue May 24, 2005 5:29 pm    Post subject: Re: TPageContol's Tabs not displaying properly Reply with quote


"Analian" <analian (AT) mail (DOT) bg> wrote


Quote:
But then what should I use TabIndex for??

Nothing. It is only useful if you were using TTabControl instead.


Gambit



Back to top
François Charton
Guest





PostPosted: Thu May 26, 2005 1:25 pm    Post subject: Re: TPageContol's Tabs not displaying properly Reply with quote


"Analian" <analian (AT) mail (DOT) bg> a écrit dans le message de news:
[email]42933801 (AT) newsgroups (DOT) borland.com[/email]...
Quote:
Thanks. That does the trick. But then what should I use TabIndex for??



If some of the pages in your TPageControl are hidden (Pages[i]->TabVisible
set to false), the TabIndex property will contain the index of the selected
tab, in the tab control (for instance, if you have three pages Page1, Page2,
and Page3, if Page2 is not visible, selecting Page3 will set TabIndex to 2,
whereas ActivePageIndex is 3).

This can be useful if you need to retrieve the position of the selected tab,
TabRect(TabIndex) will point to the corresponding rectangle. It can be
useful for custom drawing (although the ownerdraw property makes it less so)
or displaying a popup menu when a tab is selected.

Francois




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.