PDA

View Full Version : How to put tooltip in dotNetControl "System.Windows.Forms.Label"?


miauu
11-15-2010, 11:12 AM
Hi!
How to put tooltip in dotNetControl "System.Windows.Forms.Label"?


(
rollour testLabel "Test Label"
(
dotNetControl dNet_Label_selLP "System.Windows.Forms.Label" pos:[2,58] width:38 height:20 text:"test" -- tooltip:"This is test tooltip" ????????
)
)
Also, can аnyone tell me how to use dotnet tooltip instead maxsript tooltip on msxscript button?

Thanks and sorry for my bad english. :)

denisT
11-15-2010, 01:49 PM
How to put tooltip in dotNetControl "System.Windows.Forms.Label"?



try(destroydialog rol) catch()
rollout rol "ROL"
(
local tt = dotnetobject "ToolTip"
dotnetcontrol lb "Label" text:"It's a label"
fn init =
(
tt.SetToolTip lb "Click Me!"
)
on rol open do init()
)
createdialog rol



Also, can аnyone tell me how to use dotnet tooltip instead maxsript tooltip on msxscript button?


It's doable but not easy. Just use .NET button instead of MXS one. You can make its look exactly as MXS button.

miauu
11-15-2010, 02:49 PM
Thank you verry mutch, DenisT.
Can you tell me whether dotnet tooltip may look like this, with formated text and icons?
http://img843.imageshack.us/img843/9029/06tooltipsref.jpg

:)

denisT
11-15-2010, 03:01 PM
the examples those you shown are WPF ToolTip controls. .NET Forms ToolTip control doesn't support these features. If you like to have the features go with WPF.

miauu
11-15-2010, 03:40 PM
Thanks again, DenisT :)

LoneRobot
11-15-2010, 10:36 PM
You can override the tooltip class to paint a custom tooltip 'by hand' using GDI+. It's a bit of a pain to to do but you can add images and styling this way. It's not as nice as the WPF stuff, and I wouldn't attempt it via MXS!

CGTalk Moderation
11-15-2010, 10:36 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.