| View previous topic :: View next topic |
| Author |
Message |
Analian Guest
|
Posted: Tue May 24, 2005 1:16 pm Post subject: TPageContol's Tabs not displaying properly |
|
|
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
|
Posted: Tue May 24, 2005 2:19 pm Post subject: Re: TPageContol's Tabs not displaying properly |
|
|
Thanks. That does the trick. But then what should I use TabIndex for??
|
|
| Back to top |
|
 |
François Charton Guest
|
Posted: Tue May 24, 2005 2:21 pm Post subject: Re: TPageContol's Tabs not displaying properly |
|
|
"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
|
Posted: Tue May 24, 2005 5:28 pm Post subject: Re: TPageContol's Tabs not displaying properly |
|
|
"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
|
Posted: Tue May 24, 2005 5:29 pm Post subject: Re: TPageContol's Tabs not displaying properly |
|
|
"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
|
Posted: Thu May 26, 2005 1:25 pm Post subject: Re: TPageContol's Tabs not displaying properly |
|
|
"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 |
|
 |
|