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 » Changing mouse icon with MouseEvent
Re: Changing mouse icon with MouseEvent [message #54802 is a reply to message #54800] Thu, 17 September 2020 11:22 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3435
Registered: August 2008
Senior Veteran
Thank you Mirek

Unfortunately the code always shows a hand.
Next option works, although it probably could be improved:
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct App : TopWindow {
	bool showHand = false;
	
	virtual void LeftDown(Point, dword) 	{showHand = true;}
	
	virtual void LeftUp(Point, dword) 	{showHand = false;}
	
	virtual Image CursorImage(Point, dword) {
		if (showHand)
			return Image::Hand();
		else
			return Image::Arrow();
	}
};

GUI_APP_MAIN
{
	App().Run();	
}


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [GlCtrl] Integration and use of Glad loader instead of Glew
Next Topic: Background color of StaticText or EditString
Goto Forum:
  


Current Time: Mon May 12 23:01:13 CEST 2025

Total time taken to generate the page: 0.05047 seconds