Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Ribbon Tech Support » TabPage Close Button Collapse All
Subject Author Date
David Spenner Jun 14, 2013 - 5:54 AM

Hello,

is there a way to display a close button on each tab page to close or remove the tab page.

Alexander Zubkov Jul 17, 2013 - 3:34 AM

Hello.

Have. 
Your component TabControl set property TabDrawMode equal UserforegroundProcessed events OnPaintTabForeground.

For example:



...
// Image
    e.Graphics.DrawImage (e.TabPage.DefaultSmallImage, new Rectangle (5, 1, 16, 16));
// Text
    e.Graphics.DrawString (e.TabPage.Text, e.TabPage.Font, new SolidBrush (e.TabPage.ForeColor), 20, 4);
// Close Button
    e.Graphics.DrawImage (imageCloseNotActive, new Point (e.TabRelativeBounds.Width - 22 2));
...



And we can achieve the following:



Good luck.