sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Toolbar position

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 3 Posters 571 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • bomastudioB Offline
      bomastudio
      last edited by

      Dou you know any way to show a new toolbar near the mouse arrow position?

      1 Reply Last reply Reply Quote 0
      • K Offline
        kaas
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          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.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • bomastudioB Offline
            bomastudio
            last edited by

            OK. Could you give some more info about the Windows trick? MAC users aren't in my plan for the next year....

            1 Reply Last reply Reply Quote 0
            • Dan RathbunD Offline
              Dan Rathbun
              last edited by

              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 Dialogs

              Just 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 the DL library transparently.
              But DL has also been deprecated, and produces a warning to STDOUT whenever it is first required, ie, a require("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.html

              As 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.

              I'm not here much anymore.

              1 Reply Last reply Reply Quote 0
              • bomastudioB Offline
                bomastudio
                last edited by

                A lot of things to study..... many thanks Dan....you are a GURU!!!

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement