Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 next 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.
Re: Bugfix: ArrayCtrl Black info popups [message #14568 is a reply to message #14553] Mon, 03 March 2008 20:23 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Interestingly, we have found this too & fixed it Smile

Mirek
Previous Topic: Problem w/ HeaderCtrl.SetPaper() in my app.
Next Topic: SqlArray bad select?
Goto Forum:
  


Current Time: Mon Apr 29 00:37:58 CEST 2024

Total time taken to generate the page: 0.05745 seconds