Strange ribbon layout when groups height increased |
Post Reply |
Author | |
Tsenoh
Groupie Joined: 08 November 2006 Status: Offline Points: 69 |
Post Options
Thanks(0)
Posted: 20 December 2006 at 12:51pm |
Hi!
I have following problem: I needed a larger Toolbar in order to place my ListBox on the first Tab. As the result, the other controls are oddly positioned. The vertical space between two buttons is not always the same, and seams to be bigger if the controls are lower on the Toolbar. Is this a bug? Have you seen this before? It looks like the calculation problem. I will try to find the problem myself, and if I do, I will let you know. Greets, Bojan Hrnkas |
|
Tsenoh
Groupie Joined: 08 November 2006 Status: Offline Points: 69 |
Post Options
Thanks(0)
|
Btw, is it possible to force buttons that have style xtpButtonIconAndCaptionBelow to be placed in two or more rows if there is enough space?
Thanks! Bojan |
|
Tsenoh
Groupie Joined: 08 November 2006 Status: Offline Points: 69 |
Post Options
Thanks(0)
|
Found it!
It is in CXTPRibbonGroup::CenterColumn, file XTPRibbonGroups.cpp, line 773. Code: pControl->rcControl.OffsetRect(0, nOffset); nOffset += nOffset; With each iteration, the offset is doubling, instead of increasing by the original offset. I would suggest something like this: int nOffsetStep = (nGroupHeight - nHeight) / (nItems + 1); int nOffset = nOffsetStep; . . . pControl->rcControl.OffsetRect(0, nOffset); nOffset += nOffsetStep; Sincerely, Bojan Hrnkas |
|
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 |