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

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

Postby James Bott » 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: Select all  Expand view
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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

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

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

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

Postby Antonio Linares » Wed Jun 09, 2010 3:34 am

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby James Bott » Wed Jun 09, 2010 5: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

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

Postby sambomb » 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
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

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

Postby Marcelo Via Giglio » 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
Marcelo Via Giglio
 
Posts: 1050
Joined: Fri Oct 07, 2005 3:33 pm
Location: Cochabamba - Bolivia

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

Postby sambomb » Thu Jun 10, 2010 2: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
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

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

Postby James Bott » Thu Jun 10, 2010 2: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

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

Postby sambomb » Fri Jun 11, 2010 1: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
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

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

Postby cladron » 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()
User avatar
cladron
 
Posts: 6
Joined: Wed Feb 08, 2006 12:32 am
Location: Lima - Perú

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests