View Full Version : 2 questions about the gw.text

09 September 2009, 11:17 PM
I've 2 questions about

I would like to display some informations in the viewport.

I found how to do it. (

Fn DisplayVolFn =
gw.setTransform(matrix3 1)
for o in objects where not o.isHidden do
gw.text o.pos ((VolObjFn o)as string) color:yellow
gw.enlargeUpdateRect #whole

my first question is:

how could i display my text over my objects and not hidden by them. Like on the 2nd picture below. I would like to display it, if possible, like a ToolTip (3rd picture below).

Second question: I would like to display the result for the object my mouse move over and not for all the objects and all the time. I think I'll have to use the mouseTrack() Fn. Right?

09 September 2009, 12:35 AM
Does this help you?

09 September 2009, 08:45 AM
I ll look at your script.
Thanks Paul

09 September 2009, 12:23 PM
For the second problem you will have to do some hit testing and mouseTracks would probably be the best bet there. In my script I allow for placing message beside objects as well as just on the screen. There are several ways that you can display them. You are free to use this script any way you like, just load it and make an instance of the struct and call it with any one or multiple of the parameters that are provided. There is help in the header of the script.

08 August 2010, 12:56 PM
hey, cool! Thanks paul. I was just looking for a script like this. But I tried it and it is only displaying the grey rectangle but no text at all. No matter what string i provide.


09 September 2010, 12:27 PM
I have seen problems with it in recent versions of Max. I don't use this any more and go with dotNet solutions instead that have way more control.

Here is an example of it working. What I have is a form laid over the viewport and I'm drawing into it where I need to. Have a look on my web site for the GDI+ drawing methods tutorial.

CGTalk Moderation
09 September 2010, 12:27 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.