Jump to content

Recommended Posts

This is a continue of my Listbox Questions. But I made a new topic because it's independent of that.

Is there a difference between the normal ToolTip and changing the ToolTip with GuiSetControlEx?

I got the latest unstable. Multiline in a ToolTip works.

Tooltip("1st line"& @CRLF & "2nd line")
sleep(2000)

But with this There is no new line in the ToolTip.

FileChangeDir(@ScriptDir)
GUICreate("Title", 110, 110)
$listbox_1 = GuiSetControl ("list", "", 5,5,100,100)
GuiSetControlNotify()
GUISetControlData($listbox_1,"Item1|Item2|Item3")
;-------------------------------------------------
GuiShow()

While GUIMsg() <> -3
If GuiRead() = $listbox_1 Then
GUISetControlEx($listbox_1, 0 ,0 ,"1st line" & @CRLF & "2nd line")
EndIf
Wend

I made this example simple just that one can check this out. Normally I have very long items in the listbox and want to display them in ToolTip. So it's possible that the output exceeds the screen. But this would be no problem because I can change my Tabs to a CRLF with a StringReplace.

arctor

Link to post
Share on other sites

In CreateTOOLTIP(), add these 3 lines:

RECT dtw;
GetWindowRect(GetDesktopWindow(), &dtw);
SendMessage(tthWnd, TTM_SETMAXTIPWIDTH, 0, (LPARAM)dtw.right);

They should go after the line:

GUICtrl[m_iLastDefined].hTip = tthWnd;
Link to post
Share on other sites

In CreateTOOLTIP(), add these 3 lines:

RECT dtw;
GetWindowRect(GetDesktopWindow(), &dtw);
SendMessage(tthWnd, TTM_SETMAXTIPWIDTH, 0, (LPARAM)dtw.right);

They should go after the line:

GUICtrl[m_iLastDefined].hTip = tthWnd;
Thanks Valik that's solve the @Arctor issue :D
Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...