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 » show tooltip as QTF
show tooltip as QTF [message #19947] Wed, 04 February 2009 21:55 Go to next message
MatthiasG is currently offline  MatthiasG
Messages: 27
Registered: January 2008
Location: Germany
Promising Member
Hello,

as asked in the title: is it possible to show tooltips as QTF?

greetings
Matthias
Re: show tooltip as QTF [message #19948 is a reply to message #19947] Wed, 04 February 2009 22:48 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
I believe the answer is yes. Current help system does that.

Regards,
Novo
Re: show tooltip as QTF [message #19953 is a reply to message #19947] Thu, 05 February 2009 08:35 Go to previous messageGo to next message
MatthiasG is currently offline  MatthiasG
Messages: 27
Registered: January 2008
Location: Germany
Promising Member
OK, question is now: how do i do this?
Re: show tooltip as QTF [message #19957 is a reply to message #19953] Thu, 05 February 2009 12:52 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
A small example...
#include <CtrlLib/CtrlLib.h>
using namespace Upp;

class ToolTipEx : public TopWindow {
	ToolTip tip;
public:
	ToolTipEx()
	{
		tip.Set("\1Hello [*@3 World]");
	}
	void LeftDown(Point p, dword keyflags)
	{
		if(!tip.IsOpen())
			tip.PopUp(this, p, true);
		else
			tip.Close();
	}
};

GUI_APP_MAIN
{
	ToolTipEx().Run();
}


if the string start with \1 then it is qtf formated... read more about qtf.
Re: show tooltip as QTF [message #19960 is a reply to message #19957] Thu, 05 February 2009 15:17 Go to previous messageGo to next message
MatthiasG is currently offline  MatthiasG
Messages: 27
Registered: January 2008
Location: Germany
Promising Member
oh, i see... didn't know there is a class called ToolTip...

But i want a tooltip for a button, appearing not on a mouseclick, but when the user stays with the mouse over the button...
i have found, i can do:

Button bt;
bt.Tip ("Tooltip text");


This works for normal text, but not for QTF formatted text...

Is there a way to achieve this?
Re: show tooltip as QTF [message #19962 is a reply to message #19960] Thu, 05 February 2009 15:48 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
It does works, but you have to put the '\1' at the beginning to tell it to use QTF:
btn.Tip("\1[@R This works!]")

[Updated on: Thu, 05 February 2009 15:49]

Report message to a moderator

Re: show tooltip as QTF [message #19970 is a reply to message #19947] Fri, 06 February 2009 09:34 Go to previous message
MatthiasG is currently offline  MatthiasG
Messages: 27
Registered: January 2008
Location: Germany
Promising Member
ah, yes, now i't works... tried to only use a QTF i got from a richedit, but didn't know i have to put a '\1' in front of it.

many thanks to you all

greetings
Matthias
Previous Topic: Focus on the PromptYesNo dlg
Next Topic: how to define hot-keys not associated with any menu?
Goto Forum:
  


Current Time: Fri Mar 29 06:26:07 CET 2024

Total time taken to generate the page: 0.01395 seconds