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

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: Wed May 06 08:34:30 GMT+2 2026

Total time taken to generate the page: 0.00401 seconds