Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Bugfix: ArrayCtrl Black info popups
Bugfix: ArrayCtrl Black info popups [message #14553] |
Mon, 03 March 2008 17:23 |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
If the info popup (gets displayed when the text won't fit in the column) is openning and NoBackground is set, Null is being used for it's background. Test package attached.
The fix is simple:
void ArrayCtrl::SyncInfo()
{
if((HasMouse() || info.HasMouse()) && !IsEdit() && popupex) {
Point p = GetMouseViewPos();
Point c;
c.y = GetLineAt(p.y + sb);
if(c.y >= 0) {
for(c.x = 0; c.x < column.GetCount(); c.x++) {
Rect r = GetCellRect(c.y, c.x);
if(r.Contains(p)) {
if(!IsCtrl(c.y, c.x)) {
int cm = column[c.x].margin;
if(cm < 0)
cm = header.Tab(header.FindIndex(c.x)).GetMargin();
dword st;
Color fg, bg;
Value q;
const Display& d = GetCellInfo(c.y, c.x, HasFocusDeep(), q, fg, bg, st);
info.Set(this, r, q, &d, fg, bg ? bg : SColorPaper, st, cm); // <<< Check bg isn't Null
return;
}
break;
}
}
}
}
info.Cancel();
}
Tested on both MSVC8 & MingW.
|
|
|
|
Goto Forum:
Current Time: Sat Jun 08 08:34:44 CEST 2024
Total time taken to generate the page: 0.02340 seconds
|