View previous topic :: View next topic |
Author |
Message |
h4c0r-BG Master Cheater
Reputation: 0
Joined: 29 Nov 2006 Posts: 449 Location: The yogurt country
|
Posted: Tue Oct 09, 2007 9:06 am Post subject: [Delphi] Close/destry tab in Pagecontrol? How? |
|
|
Ok everybody knows that we easily can create tabs in pagecontrol like that:
Code: | TTabSheet.Create(PageControl1); |
But is there a way to destroy/close them?  _________________
|
|
Back to top |
|
 |
assaf84 Expert Cheater
Reputation: 0
Joined: 03 Oct 2006 Posts: 238
|
Posted: Tue Oct 09, 2007 10:29 am Post subject: |
|
|
I'm pretty sure there is a "Destroy" procedure.. |
|
Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Tue Oct 09, 2007 11:39 am Post subject: |
|
|
you can use the free or the destroy procedure. |
|
Back to top |
|
 |
h4c0r-BG Master Cheater
Reputation: 0
Joined: 29 Nov 2006 Posts: 449 Location: The yogurt country
|
Posted: Tue Oct 09, 2007 1:25 pm Post subject: |
|
|
assaf84 wrote: | I'm pretty sure there is a "Destroy" procedure.. |
Yes there should be a way to use "destroy" but what is it ...
And look i am not a retard ... screenshot proof that there isn't any desired from me commands.
No close =
No destroy =
No free =
So what is the way to close the tabs ... for sure is not the way that i use.  _________________
|
|
Back to top |
|
 |
XTrinityX Expert Cheater
Reputation: 0
Joined: 18 May 2006 Posts: 123 Location: Connecticut
|
Posted: Tue Oct 09, 2007 2:01 pm Post subject: |
|
|
(Doesn't have delphi open so it might not work.)
I seem to recall getting rid of pages by doing.
PageControl1.Pages[Page#].Destroy,Free,Close.
I don't remember which one does it..but I think that is how you do it ><. Don't hate me if it's wrong lol.
Just play around in PageControl1.Pages, you'll probably find it. |
|
Back to top |
|
 |
HolyBlah Master Cheater
Reputation: 2
Joined: 24 Aug 2007 Posts: 446
|
Posted: Tue Oct 09, 2007 2:01 pm Post subject: |
|
|
its because you serch for it in the class(ttabsheet).
do it like this:
Code: | [tabsheetname].Destroy |
eg:
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 468
Joined: 09 May 2003 Posts: 25710 Location: The netherlands
|
Posted: Tue Oct 09, 2007 8:38 pm Post subject: |
|
|
when you create it assign the result of the .create to a variable of type ttabsheet, so after on you can do tabsheetvar.free;
if you didn't, you should still be able to get to it using a enumeration of objects that belong to the pagecontrol it was created for _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|