AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ToolTip() - Advanced ToolTip features + Unicode
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Do you think AutoHotkey should have that features/function internally?
Yes
33%
 33%  [ 4 ]
Yes, even more ToolTip features please
33%
 33%  [ 4 ]
No, I don't need them
0%
 0%  [ 0 ]
No, to complex to use
25%
 25%  [ 3 ]
No
8%
 8%  [ 1 ]
Total Votes : 12

Author Message
Gauss



Joined: 10 Sep 2009
Posts: 203

PostPosted: Sun Feb 07, 2010 5:16 pm    Post subject: Reply with quote

Didn't work
That will make it appear at the top of the screen
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Sun Feb 07, 2010 7:15 pm    Post subject: Reply with quote

Hm.. it does for me. This one is for Top, what does it do for you?
Have you got 2 monitors?
Code:
ToolTip(99,Clipboard
      , "Winamp"
      , "Q1 O1 T190 E2.2.50.25 J1 S1 BWhite FBlack I1"
      . " P99 X" (A_ScreenWidth-200) . " Y" . (-22))
Sleep, 2000
ExitApp

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Gauss



Joined: 10 Sep 2009
Posts: 203

PostPosted: Sun Feb 07, 2010 7:51 pm    Post subject: Reply with quote

Yes sir..
I do have 2 monitors, but the result is the same when the second monitor is enabled or not.
All I was is to have the tooltip appearing just on top of the system tray with no tail or a tail that will point to the corner of the screen.

Can't you just delete the tail somehow? lol
cut it off Very Happy
Back to top
View user's profile Send private message
segalion
Guest





PostPosted: Wed Feb 10, 2010 5:19 pm    Post subject: icons = gif/png, etc? Reply with quote

I would like if can be possible to put GIF or PNG images as icons?

If it cannot be possible could be the Icons of an Imagelist of listview?

I dont know how to get the handle needed by tooltip function...

Thansk for this great lib...
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Wed Feb 10, 2010 6:15 pm    Post subject: Reply with quote

Have a look into InfoToolTip, it displays the color under mouse as Icon in ToolTip, though not sure if it helps.
You will have to load your image as icon, then pass hIcon using I option.
Something like this
Code:
SetWorkingDir % A_ScriptDir
hicon := DllCall("LoadImage", UInt, 0, Str, "ahk.ico", UInt, 1, Int, 16, Int, 16, UInt, 0x10)
ToolTip(1,"hallo","test","I" hIcon)
DllCall("DestroyIcon","UInt",hIcon)


I am not sure if it is possible to do using a Bitmap, just give it a try Wink
MSDN LoadImage
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Guest






PostPosted: Mon Feb 15, 2010 2:36 pm    Post subject: Reply with quote

Very nice.
I have Win7, colors wont work here..
Can you do something about it?
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Mon Feb 15, 2010 7:40 pm    Post subject: Reply with quote

Anonymous wrote:
Very nice.
I have Win7, colors wont work here..
Can you do something about it?

Sure, easily use option Q1 to force default ToolTip.
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Feb 16, 2010 7:55 am    Post subject: Reply with quote

HotKeyIt wrote:
Anonymous wrote:
Very nice.
I have Win7, colors wont work here..
Can you do something about it?

Sure, easily use option Q1 to force default ToolTip.

Very Happy Yes, is working I love you!
Back to top
Guest






PostPosted: Tue Feb 16, 2010 7:57 am    Post subject: Reply with quote

It'posible to add shadows?
Back to top
fragman



Joined: 13 Oct 2009
Posts: 1199

PostPosted: Thu Mar 18, 2010 8:12 pm    Post subject: Reply with quote

Is it possible to react to clicks on the tooltip and to clicks on links differently?
I would like to close the tooltip when I click on it, but do something else when I click on a link.

Also, I tried using the Delay feature in combination with this, but I only get a waiting cursor when hovering over the tooltip, and AHK tray icon is unresponsive.

Edit:

I managed to use links and close on clicking elsewhere, but my solution is a bit hackish, and there is probably a better one, so please let me know if there is.

My Solution:

Code:
WM_LBUTTONDOWN(wParam,lParam,msg,hWnd){
   global LinkClicked
   LinkClicked:=-1
   SetTimer, test, -10
   outputdebug lbuttondown
}

WM_NOTIFY(wParam, lParam, msg, hWnd){
  ToolTip("",lParam,"")
}
testclick:
i:=0
while(LinkClicked=-1 && i<100)
{
   Sleep 10
   i+=10
}
if(LinkClicked<=0)
   Tooltip()
return
ToolTip:
link:=ErrorLevel
ToolTip()
If(TooltipShowSettings && Link) {
   ShowSettings()
   LinkClicked:=1
}
Return

ToolTipClose:
Tooltip()
return
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Fri Mar 19, 2010 6:59 am    Post subject: Reply with quote

Try this, though it is not much better, but works okay Wink
Code:
OnMessage(0x202,"WM_LBUTTONUP") ;Will make ToolTip Click possible
WM_LBUTTONUP(wParam,lParam,msg,hWnd){
   global tthwnd
   If (tthwnd=hwnd)
      SetTimer,CloseToolTip,-20
}
OnMessage(0x4e,"WM_NOTIFY") ;Will make LinkClick and ToolTipClose possible
WM_NOTIFY(wParam, lParam, msg, hWnd){
   Critical
   ToolTip("",lParam,"")
}
Sleep, 10
Gosub,#s
Return

#s:: ;Show toolTip
tthwnd:=ToolTip(1,"<a>Click</a>`n<a>Onother one</a>`n"
. "<a This link is different`nit uses different text>Different</a>`n"
. "<a>ExitApp</a>","ClickMe","L1 P99 C1")
Return

ToolTip:
link:=ErrorLevel
SetTimer,CloseToolTip,Off
SetTimer, MsgBox, -10
Return

CloseToolTip: ; C lick on ToolTip (no link)
   ToolTip(1)
Return

ToolTipClose: ; Button close
ExitApp

MsgBox:
If Link=ExitApp
   ExitApp
MsgBox % Link
Return

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
fragman



Joined: 13 Oct 2009
Posts: 1199

PostPosted: Sat Mar 20, 2010 11:32 am    Post subject: Reply with quote

Yeah, that works too. Any idea about the delay?
Right now I'm just starting a second timer that closes the tooltip, but there are better ways I guess.
Windows 7 also fades out its balloon tips, is this a standard feature or did they put a loop somewhere that modifies transparency?
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Sat Mar 20, 2010 5:35 pm    Post subject: Reply with quote

Try this:
Code:
ToolTipU(1,"","","GTTM_POP")

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
000sixzeros000



Joined: 17 Oct 2009
Posts: 43

PostPosted: Thu Jun 24, 2010 10:31 pm    Post subject: Reply with quote

Is it possible to render HTML/CSS into a tooltip?

Code:

 html:="<span style="background: #000000">Test Text</span>"
 setTooltipTextAsHTML(HTML)


Im wondering if it's possible to somehow modify this thing to feed a HTML string over to a dll that renders it into the visible display area of the tooltip. or something like that, so we can have a more versatile rendering system than the simple foreground/background option..

I've been trying to workout how to dynamically render a color coded chart, that will popup when you mouse over a the fields of a listbox.. but I cant seem to find any way to do it.. I looked in the source to see if there was a way to trick the background color under each character, but couldnt work it out.. I need to be able to set the background and foreground of each character, and not just the whole document.

I could create the chart in html easily..



I dont need a full blown web browser.. just a more versatile way to represent text and content.

or maybe there's a way to extend the text input to add some tags..
<BGC=#123456 >Background Color</BGC>
<FGC=#654321>Foreground Color</FGC>
or
<style Color:1234 background:4321><style>
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Thu Jun 24, 2010 10:48 pm    Post subject: Reply with quote

Unfortunately for a ToolTip you can only change Background and Foreground color.
Possibly you could do it using GDI+ but that is too complex I think.
You would show up an empty ToolTip and draw on it.
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 7 of 8

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group