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 » Creating a hyperlink label
Re: Creating a hyperlink label [message #41232 is a reply to message #41218] Sun, 17 November 2013 12:05 Go to previous messageGo to previous message
crydev is currently offline  crydev
Messages: 151
Registered: October 2012
Location: Netherlands
Experienced Member
Thanks Klugier,

I now solved that problem the following way, allowing me to set the LaunchWebBrowser call as WhenLeftDown callback:

// Represents a label that is clickable, for example, to execute a hyperlink.
class HyperlinkLabel : public ParentCtrl
{
private:
	Label mLinkLabel;

	virtual void LeftDown(Point p, dword keyflags) { this->WhenLeftDown(); }
public:
	Callback WhenLeftDown;
	
	HyperlinkLabel() { *this << this->mLinkLabel.SizePos(); }
	
	HyperlinkLabel& SetLabel(const char* lbl) { this->mLinkLabel.SetLabel(lbl); return *this; }
};


This works, but one question remains. I have already tried a few things, for example, overriding MouseEvent, and using a RectTracker, but none really seemed to work for me. I would like to change the cursor to a hand while the mouse is on top of the control.

Thanks in advance!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using a Button to load a window/form using Run. THISBACK syntax
Next Topic: Win32: custom WM_XXXXX message processing
Goto Forum:
  


Current Time: Tue May 14 00:11:59 CEST 2024

Total time taken to generate the page: 0.02684 seconds