U++ framework
Do not panic. Ask here before giving up.

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 Go to previous message
mrjt is currently offline  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.
 
Read Message
Read Message
Previous Topic: Problem w/ HeaderCtrl.SetPaper() in my app.
Next Topic: SqlArray bad select?
Goto Forum:
  


Current Time: Thu May 14 01:20:13 GMT+2 2026

Total time taken to generate the page: 0.00557 seconds