tooltips

tooltips

Anonymous
Not applicable
468 Views
10 Replies
Message 1 of 11

tooltips

Anonymous
Not applicable
I don't think it's possible but just in case.
Does anyone know how to:
- create a multi line tooltip?
- change how long it is displayed?

Thanks for your time.
0 Likes
469 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable
For a new line in a tooltip, I think you can use

\n


Which will insert a carriage return in the tooltip/

Look up escape characters in the maxscript help file.
I don't know about the duration issue though.
0 Likes
Message 3 of 11

Anonymous
Not applicable
Thanks for answering, zzubnik.
\n doesn't work. It is ignored (not displayed in the tooltip) but everything stays on one line.
0 Likes
Message 4 of 11

Anonymous
Not applicable
That is strange, I tried it before I posted and it worked. I have just tried this line with a tool-tip, and it definitely works.

button btn1 "Colorize" pos: width:97 height:18 tooltip: "first line \n second line"


Hope this helps.

EDIT: Not to be outdone, I've also added an image attachment (yes, I am bored) 🐵

0 Likes
Message 5 of 11

Steve_Curley
Mentor
Mentor

button btnSelect "&Select" pos: width:49 height:36 Tooltip:("Multi"+"\n"+"Line"+"\n"+"Tooltip")


AFAIK the time a tooltip is displayed is controlled by windows. It may be possible to alter / override that time, but I have a feeling you would need to be working at a much lower level than is exposed by MXS (ie. the SDK) if it is indeed possible to begin with.

zzubnik's method should work too, but if you leave a space after the \ n that space will be displayed


Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 6 of 11

Anonymous
Not applicable
Strange indeed. It seems to depend on context.
I tried this:
rollout rlt "test" width:100 height:100
(
button btn1 "button" pos: width:50 height:20 tooltip: "first line \n second line"
)
createDialog rlt 100 100

and got this:

Edit: I'm using max 9. Could it be that?

0 Likes
Message 7 of 11

Steve_Curley
Mentor
Mentor

(
local test

rollout test "test"
(
button btnSelect "Select" pos: width:80 height:24 Tooltip:"Multi\nLine\nTooltip"
button btnCreate "Create" pos: width:80 height:24
)

try (destroyDialog test) catch()
CreateDialog test
)



Yes - that's your problem, it fails here in Max 9 also. Time to upgrade? 😛


Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 8 of 11

Anonymous
Not applicable
I just tried your code. It works fine on 2009, but in max 9 it doesn't display the tooltip correctly.

EDIT: Steve, you type too fast for me!
0 Likes
Message 9 of 11

Anonymous
Not applicable
Ok then. Thanks a lot, guys.

Time to upgrade?

I'd rather wait to see where it's heading.
0 Likes
Message 10 of 11

Steve_Curley
Mentor
Mentor
The typing is fast, correcting all the typos takes ages... 😄

Cap - point taken. That should have been in ... tags (TIC = Tongue in cheek) 🙂

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 11 of 11

Anonymous
Not applicable
I know this thread has been dead for almost a year but:

I ran across the need for a multi-line tooltip on an imgTag (to show RGBA values in an orderly fashion). However multi-line tooltip fails here. I tried the imgTag as a button and it works just fine. SO: imgTag cannot have multi-line tooltip (as of max 2010)
0 Likes