I went about creating a custom TabControl widget so that I could accurately paint the tab with a close X on the right edge of the tab.I have a custom array class that holds all of the tabs.