Incorrect bounding box of CXTPPropertyGridItem |
Post Reply |
Author | |
akur
Senior Member Joined: 16 May 2006 Status: Offline Points: 139 |
Post Options
Thanks(0)
Posted: 07 May 2007 at 8:02am |
Hello,
I'd like to ask you if there is a reason why CXTPPropertyGridItem::OnDrawItemValue() and CXTPPropertyGridItem::GetValueRect() use different-height rectangles? The documentation says: virtual BOOL OnDrawItemValue( CDC& dc, CRect rcValue); virtual CRect GetValueRect(); Returns - A CRect object that represents the bounding rectangle of the item value's text. So both rects should be a bounding box of the value part, shouldn't they? However, in my override of CXTPPropertyGridItem class, in OnDrawItemValue() I get a height which is different from what GetValueRect() returns -- this makes my owner-drawn propertygrid items look strange (jumping one pixel up and down sometimes, according to some special actions I use). Can you please explain why the rectangles are different? Or is this simply a bug? Is there a solution for this (using XTP v11.1)? Thank you, in advance! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
for OnDrawItemValue doesn't used bottom line.
you can add in your code
CRect rcBound(rcValue);
rcBound.bottom++;
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
akur
Senior Member Joined: 16 May 2006 Status: Offline Points: 139 |
Post Options
Thanks(0)
|
I see. And can I rely on that this line will be always exactly 1 pixel high - with all the different themes and styles a PropertyGrid can have?
|
|
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 |