Page 1 of 2

Antonio,need help!How to ShowToolTip without move the mouse

Posted: Fri Jun 04, 2010 1:05 pm
by sambomb
I have a tooltip in a get and in a MsgBar, and I need to show both when I show my dialog, my app is for markets, and the use of mouse is rare in my app

I already tryed the ShowToolTip() method but it didn't work

I searched in the forum but didn't found a solution, some topics like these simple go on unanswered....

Re: How to ShowToolTip without move the mouse

Posted: Fri Jun 04, 2010 1:56 pm
by James Bott
If I remember correctly, you need a tooltip class. There was one posted here some time ago.

The normal FW tooltip is not a class but rather some functions in TWindow (I think). This is why you need a Tooltip class.

Try searching again for "tooltip class."

James

Re: How to ShowToolTip without move the mouse

Posted: Fri Jun 04, 2010 5:54 pm
by sambomb
I don't have the TTip class and don't like to use third code, Fivewin already have the code but it didn't work or I couldn't discover how to use because of the lack of comments...

But thanks for answer

Re: How to ShowToolTip without move the mouse

Posted: Fri Jun 04, 2010 8:23 pm
by James Bott
>Fivewin already have the code but it didn't work or I couldn't discover how to use because of the lack of comments...

I am trying to tell you that you can't do what you want using only FW native code. The functions are STATIC functions inside one of the FW PRGs, and you cannot call a STATIC function outside the PRG.

I know this because I spent many hours on this issue years ago.

James

Re: How to ShowToolTip without move the mouse

Posted: Fri Jun 04, 2010 9:03 pm
by sambomb
So don't you think that Antonio should do something?
I really don't want to move the mouse via code and return to the original position just to show the tooltip...
I didn't find the TTip class

Re: How to ShowToolTip without move the mouse

Posted: Fri Jun 04, 2010 9:31 pm
by James Bott
>So don't you think that Antonio should do something?

Antonio says that the tooltips are STATIC for speed reasons.

>I didn't find the TTip class

According to this thread:

http://forums.fivetechsupport.com/viewt ... +tooltips+

FW has a new TTooltip class as of version 8.09. I have not tried using it.

James

Re: How to ShowToolTip without move the mouse

Posted: Mon Jun 07, 2010 11:47 am
by sambomb
I can't find this class in my 9.06 version

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Mon Jun 07, 2010 3:02 pm
by James Bott
I don't see that class either. Antonio?

James

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Tue Jun 08, 2010 12:13 pm
by sambomb
James Bott wrote:I don't see that class either. Antonio?

James
Antonio! Where are you?

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Tue Jun 08, 2010 2:31 pm
by Antonio Linares
I am out of the office until tomorrow, so I will check it as soon as I am back there where we have all our tools :-)

Please send me a reminder, if I don't answer by tomorrow, thanks

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Tue Jun 08, 2010 3:30 pm
by Antonio Linares
Samir,

This code shows how to create a standard WIndows tooltip, though it behaves standard, and I don't think thats the behavior that you want:

Code: Select all

#include "FiveWin.ch"

function Main()

   local oWnd, hWndTooltip

   DEFINE WINDOW oWnd
   
   ACTIVATE WINDOW oWnd ;
      ON CLICK hWndTooltip := CreateTooltip( oWnd:hWnd, "Hello world" )

return nil
 
So I don't think we may be able to use a standard tooltip to create it and leave it fixed at a certain place. Please notice that as soon as the mouse leaves the window owner of the tooltip, it vanishes away.

Maybe we should create a small window that simulates a real tooltip

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Tue Jun 08, 2010 3:40 pm
by Antonio Linares
This info seems to provide the missing part:
http://msdn.microsoft.com/en-us/library ... le_inplace

anyhow it seems as we can only change its location in response to a notification code (TTN_SHOW) and that means that the mouse is over the window. Not sure if this may be what you want.

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Tue Jun 08, 2010 4:46 pm
by sambomb
I NEED to show the tooltip through a method or procedure...

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Tue Jun 08, 2010 4:54 pm
by Antonio Linares
Samir,

The question is: where the mouse will be ? If it goes out of the window then the tooltip will not be visible.

Is that fine for you ?

Re: Antonio,need help!How to ShowToolTip without move the mouse

Posted: Tue Jun 08, 2010 5:12 pm
by sambomb
I need to show the tooltip in a Dialog, I have 4 places where I want to show the tooltip at the same time, there is a image of what I want to do

To make this image I overlaped 4 printscreens each one the mouse is over one position
Image

Antonio Linares wrote:Samir,

The question is: where the mouse will be ? If it goes out of the window then the tooltip will not be visible.

Is that fine for you ?
The mouse will not be moved.