Jump to content

Recommended Posts

Posted

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

Posted

LOL!

Yes JPM - (I read that thread). And you are right. VALIK is the man for that job.

ToolTip is one of his favourites! :huh2:

VALIK ---> :D

Sorry, couldn't resist.

arctor

Posted

  jpm said:

@Valik

can we do something for Gui multiline tip? :D

I'll take a look at what the docs say, but I think it's set up the same way.
Posted

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;
Posted

  Valik said:

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
Posted

  Arctor said:

Thank you both for noticing my suggestion.

Do your answers mean it's working in the next unstable?

arctor

Yes, if Jon has time to integrate it :D

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...