I set a tooltip to display the error message in the view.
view.drawing_color = Sketchup::Color.new 'Red' # no effect
view.tooltip = 'test'
How to I set the red color?
I set a tooltip to display the error message in the view.
view.drawing_color = Sketchup::Color.new 'Red' # no effect
view.tooltip = 'test'
How to I set the red color?
Those tooltips are “real” tooltips, that means they conform to the application’s / operating system’s default. They are currently not customizable.
How the built-in tool do it? Where can I find the code or API?
Ok, that’s what you mean!
The built-in tool is not written in Ruby using the Ruby API, but in C++ using internal methods that are not safe and accessible for public use.
You might need to go a step back and adjust your specification .The goal is to give the user feedback about the error. The realization of this goal can be a red tooltip, but there could be alternative solutions. For example you could set the statusbar text to show the error.
… and there is also UI::Notification class for SketchUp 2017+ …
It is bottom left for me, unless I’m using my laptop upside down.
Again the docu is a little buggy, and left many thing for the user to discover himself…
But at least we have it!!