FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Antonio,need help!How to ShowToolTip without move the mouse
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Tue Jun 08, 2010 05:12 PM
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



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.
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Wed Jun 09, 2010 12:33 AM
Antonio and Samir,

Here is a little program that shows the problem. Calling oControl:showTooltip() does not force the tooltip to be displayed. If we can find a way to do this, the problem will be solved. I think this would be useful in other situations also. For instance, I would use it to force a tooltip to be displayed when the user makes an invalid entry.

James

Code (fw): Select all Collapse
include "fivewin.ch"

function main()

   local oDlg, oGet, oBtn, cName:="James"

   define dialog oDlg title "Test Tooltip"

   @ 5,5 get oGet var cName of oDlg pixel
   oGet:cTooltip:= "Test tooltip"

   // Shows that you cannot force the tooltip to be displayed.
   @ 20,5 button oBtn prompt "Show Tooltip" ;
      action oGet:showToolTip() pixel

   activate dialog oDlg

return nil
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Wed Jun 09, 2010 12:44 AM

OK, here is a clue. If I put a msgBeep() as the very last line of showToolTip(), it beeps BEFORE the tooltip is displayed, so it seems that the showTooltip() method does not acually display the tooltip. Perhaps it is just an init routine?

Now we need to find the code that actually does display the tooltip.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Wed Jun 09, 2010 05:35 AM

Here is a thread on forcing a tooltip to display, but they could find no solution.

http://www.codeguru.com/forum/archive/i ... 28180.html

It also seems that you can display only one tooltip at a time. Samir, it appears that you want to show them all at the same time?

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Wed Jun 09, 2010 11:37 AM
Antonio Linares wrote:James,

I think it is related to the standard behavior that Windows provides to the tooltip class. They relate the tooltip to the mouse movements. Maybe there is a message to be sent to the tooltip that forces its inmediate display.

But after reviewing Samir's screenshot, I think that a different implementation may be taken. I would display an overlapping bitmaps with all the "simulated" tooltips on it. Similar to samples\newhelp,prg implementation.


The image is just to show what I wish: show multiple tooltips at the same time and without move the mouse
Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Wed Jun 09, 2010 11:49 AM

Hola,

there is a post-it sample system, why not use it like a base to emualte a multiple tooltip

regards

Marcelo

Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Thu Jun 10, 2010 02:19 PM

Antonio, I'm still waiting a solution, you asked me for remember you, beside the facebook I don't have any other means to enter in contact with you, could you turn on the Private Message in the forum?

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Thu Jun 10, 2010 02:26 PM

Samir,

First, we have determined you cannot use the standard windows tooltip since only one can be displayed at one time. So you are going to have to take another approach.

Two have been mentioned. Antonio suggested using transparent bitmaps as is shown in \samples\newhelp.prg.

And Marcelo suggested looking at the sample post-it program.

Either one of these may be your answer.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 389
Joined: Mon Oct 13, 2008 11:26 AM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Fri Jun 11, 2010 01:57 PM

How to change the time the tooltip is displayed and the time the tooltip take to appear, I saw on the MSDN that the tooltip has this atributes, but don't know how to change them...

I think that with this 2 properties, 3 seconds for the first, and 0 miliseconds to the second, plus mousemove + SysRefresh() I can simulate what I want....

But James said that the windows show just one ToolTip.

Email: SamirSSabreu@gmail.com
xHarbour 1.2.3 + Fwhh 20.2
Posts: 15
Joined: Wed Feb 08, 2006 12:32 AM
Re: Antonio,need help!How to ShowToolTip without move the mouse
Posted: Mon Sep 20, 2010 10:55 PM

I recenty made this trick:

Function UserShowToolTip(cText)
oBrowse:DestroyToolTip()
oBrowse:cToolTip:=cText

// Create and destoy a dialog 
    Define dialog odlg00 from 2,2 to 3,3 STYLE WS_POPUP
        Activate dialog oDlg00 NOWAIT
        oDlg00:end() ; oBrowse:setfocus()

// Show de tooltip
oBrowse:CheckToolTip()

Continue the discussion