CXTTabCtrl bugs |
Post Reply |
Author | |
Karnize
Newbie Joined: 20 October 2003 Location: Italy Status: Offline Points: 19 |
Post Options
Thanks(0)
Posted: 21 October 2003 at 2:33am |
Hello, I use the CXTTabCtrl (from the last 8.51 release, but the same problems are in all XtremeToolkit versions) with multiline and XP styles and found some bugs. Tabs located at the top of the window, I do not test this control with vertical or bottom tabs. First of all, then you enable multiline and XP styles and tabs wraps to multiline, there is tabs drawing bug. Inactive tabs background drawing correctly only at first line and active tab elements also drawed at first line (but active tab always located at the most bottom line). In OnDrawTop function I found what you calculate int iBottom = rcClient.top + rcItem.Height(); and after that you use iBottom in all active tab drawing, but reClient.top == 0 in case of top docked tabs and rcItem.Height() returns height of ONE tab, but active tab located not at first row. For the background you also use m_pTabCtrl->GetItemRect(-1, &rcHeight); but GetItemRect returns rect also of one item, so you fill the background only at first row.
The next bug is in calculating space which tabs take up while resizing window. Then you resize you window so all tabs are located at single line and after that resize the window back, so tabs are wrap several lines, you will see what active tab content still drawed in old size and cover all tabs in bottom lines. I found this in your code: void CXTTabCtrl::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos) In OnWindowPosChangedImpl_Pre you recalculate size of all views located at tabs, but at this step tab control still think what all tabs located at single line and only in CTabCtrl::OnWindowPosChanged it knows what tabs should be wraped to multiline. So the size of all views is calculated wrong. I solve this problem in my derived class in this way: void CXTTabCtrl::OnWindowPosChanged(WINDOWPOS FAR* lpwndpos) CTabCtrl::OnWindowPosChanged(lpwndpos); All these bugs you can repeat if you run your TabCtrl example. But you should disable "Draw window content while resizing" in Windows to see the second bug. Edited by Karnize |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |