![]() |
[solved] Inplace edit bug! |
Post Reply ![]() |
Author | ||
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() Posted: 29 February 2008 at 7:55am |
|
I'm on fire today! :)
pItem->SetBackgroundColor(blue); // Nice...
...until you edit the item!
![]() Default background color should be the same as the one provided in the call to SetBackgroundColor!
The problem lies in here!
HBRUSH CXTPReportInplaceEdit::CtlColor(CDC* pDC, UINT /*nCtlColor*/)
{ pDC->SetTextColor(m_clrText); // Only text color :( return GetSysColorBrush(COLOR_WINDOW);
} Possible solution:
HBRUSH CXTPReportInplaceEdit::CtlColor(CDC* pDC, UINT /*nCtlColor*/)
{ pDC->SetTextColor(m_clrText); pDC->SetBkMode(TRANSPARENT);
return m_bUseItemBackground ? (m_brBackground : GetSysColorBrush(COLOR_WINDOW));
} |
||
![]() |
||
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1201 |
![]() ![]() ![]() ![]() ![]() |
|
Hi;
has this ever been implemented into the core? |
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
![]() |
||
olebed ![]() Admin Group ![]() Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
|
Hi,
Thank you for bringing this to our attention. I’ve added this to our bug database. The problem will be addressed according to its priority. Regards, Lebed Oleksandr |
||
![]() |
||
olebed ![]() Admin Group ![]() Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
![]() ![]() ![]() ![]() ![]() |
|
Hello,
I'm glad inform you that this have been already implemented in v18.4. Added CXTPReportInplaceEdit::m_clrBack and appropriate m_xtpBrushBack method for CXTPReportInplaceEdit::CtlColor() on creation CXTPReportInplaceEdit added initialization m_clrBack = pControl->GetPaintManager()->m_clrControlBack; Regards, Oleksandr Lebed |
||
![]() |
||
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1201 |
![]() ![]() ![]() ![]() ![]() |
|
I have to reopen this issue, because it still does not work as expected in v.22.1. Suppose you have an alternate coloring in your control and an item of a row with alternate color is edited, then the (false) background color of the control is used. In CXTPGridInplaceEdit::Create() we can find this code:
I believe it should be replaced by:
|
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
![]() |
||
mgampi ![]() Senior Member ![]() ![]() Joined: 14 July 2003 Status: Offline Points: 1201 |
![]() ![]() ![]() ![]() ![]() |
|
Improvement to the code of my previous message:
|
||
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
||
![]() |
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 |