Is it possible to get a little X on a tab like this
Attachment 79318
I can do the removing the tab part myself but i dont know if its possible and if it is how to put a button on a tab.
Thankyou in advance
Printable View
Is it possible to get a little X on a tab like this
Attachment 79318
I can do the removing the tab part myself but i dont know if its possible and if it is how to put a button on a tab.
Thankyou in advance
You have to custom-draw the tabs... I think I saw a CodeBank entry, but maybe not.
You could also use my custom-draw XTabControl but it doesn't work very well unless you add controls at runtime, not design time (it turns out that locking them makes it so you can't put controls in them...).
Can you point me in the way of this XtabControl please, as i am already adding controls at runtime on Load
Oh, good :)
Here it is. You'll need to create a new header renderer (I explain how in the thread), then handle some events.
Post 14 is the tutorial.
Hi,
You can find a tutorial how to create a Owner drawn Tabcontrol, here.
Yet another useful link for the TabControl:
http://dotnetrix.co.uk/tabcontrol.htm
I also know of several free third party tabcontrols that have close buttons, but I can't find them anymore so quickly. Shouldn't be too hard to find though. One thing I noticed is that none of them really look very good, and none of them use the windows theme that the user is using at that time. I've searched around for a bit and I can't figure out how to draw a tab header in the system theme style. I don't think it's possible :(
You may have a look at my codebank article that does exactly this:
TabControl with Close button on TabPages (with Design-Time support)
Let me know if you have any concerns.
I have done this using the drawing method from post 5, thankyou all guys anyway :)