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::Toolbarobjects, 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
Win32APIclass is deprecated, and the old so compiled binary, was replaced in Ruby 2, with a ruby script wrapper (of the same name,) that calls theDLlibrary transparently.
ButDLhas also been deprecated, and produces a warning toSTDOUTwhenever it is first required, ie, arequire("dl")call is first made.The code should be rewritten to use the
Fiddlelibrary.
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!!!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement