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 » U++ Widgets - General questions or Mixed problems » StaticRect blocks mouse events - deliberate?
StaticRect blocks mouse events - deliberate? [message #5420] Wed, 20 September 2006 17:12 Go to previous message
James Thomas is currently offline  James Thomas
Messages: 26
Registered: June 2006
Promising Member
Here is a quick example:
#include <CtrlLib/CtrlLib.h>

class AWindow : public TopWindow
{
public:
	typedef AWindow CLASSNAME;
	StaticRect r;

	AWindow()
	{
		Add(r);
		r.Color(SBlack);
		r.SetPos(r.PosLeft(10, 100), r.PosTop(10, 100));	

		SetPos(r.PosLeft(0, 200), r.PosTop(0, 100));
	}
	
	// Events	
	virtual void RightDown(Point p, dword keyflags) 
	{
		PromptOK("Right mouse button event");
	}
};

GUI_APP_MAIN
{
	AWindow w;

	w.Run();
}


When it's run a window opens with a black rectangle in it. If you click outside the rectangle you get a prompt, inside nothing happens.

This seems like pretty unhelpful behaviour and I can't see any reason for it in the StaticRect source. LabelBox and StaticText correctly pass the event up to the parent window.

Is this the way it's supposed to work?
 
Read Message
Read Message
Read Message
Previous Topic: How to call instance in main.cpp
Next Topic: Change ToolTip speed?
Goto Forum:
  


Current Time: Fri Jun 06 21:30:40 CEST 2025

Total time taken to generate the page: 0.29117 seconds