closing tabs

Please discuss general Delphi programming topics here.

closing tabs

Postby dan » August 30th, 2008, 1:43 am

what exactly would i have to do to "close" a tab in an array of TTabsheet. just free it? or set the array to 1 less? ive tried it a bunch of ways but i continue to get out of range errors.

EDIT: also, how would it be possible to make an endlessly nesting submenu system. I would think that having something call itself would work, but it doesnt. So something like the Ttabsheet.items.
dan
Member
Member
 
Posts: 1
Joined: August 30th, 2008, 1:40 am

Postby Kambiz » September 8th, 2008, 1:16 am

For a TTabSheet object, you just need to call it's Free method. But remember, if you are going to delete several tabs, start deleting from higher index to lower one.

It seems I didn't get your second question because I used to believe TMenu does what you need.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 3 guests

cron