Toolbar position
-
Dou you know any way to show a new toolbar near the mouse arrow position?
-
For native toolbars I don't think you can.
But for your own ruby scripts you can. If I remember well, you can read the current position of the mouse in ruby & javascript and feed that info to a new webdialog in ruby.
-
The positioning of
UI::Toolbar
objects, is (currently) not exposed in the Ruby API.On PC, I know how to work around this with Windows system calls, but have no clue how to do this on Mac SketchUp.
-
OK. Could you give some more info about the Windows trick? MAC users aren't in my plan for the next year....
-
Everything you see on the screen in Windows is an object subclass of window. So a button is a window. A toolbar is a window, with child button windows. This means you are searching for a child window (toolbar) of the owner window (the SketchUp application main window.)
See this old post:
[code] Win32 Moving/Showing/Hiding Toolbars and DialogsJust be aware that the
Win32API
class is deprecated, and the old so compiled binary, was replaced in Ruby 2, with a ruby script wrapper (of the same name,) that calls theDL
library transparently.
ButDL
has also been deprecated, and produces a warning toSTDOUT
whenever it is first required, ie, arequire("dl")
call is first made.The code should be rewritten to use the
Fiddle
library.
http://ruby-doc.org/stdlib-2.0.0/libdoc/fiddle/rdoc/index.htmlAs for the Windows API, that documentation is all on MSDN:
Windows API
Windows Reference
[Window Styles](https://msdn.microsoft.com/en-us/library/ms632600(v)
[Window Messages](https://msdn.microsoft.com/en-us/library/ff468921(v)
SendMessage Function
[Using Window Procedures](https://msdn.microsoft.com/en-us/library/ms633570(v)
etc.,
etc. -
A lot of things to study..... many thanks Dan....you are a GURU!!!
Advertisement