sketchucation logo sketchucation
    • Login
    1. Home
    2. season_x
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    S
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: How can I use "createPopupMenu" to create a right click Menu

      If I add common tools to the menu, They will make it too long,So I wanted to create a side-by-side menu ,so it wouldn't look too long.You know there are a lot of common tools,Their keyboard shortcuts were hard to remember,Many good software programs have a rich right - click menu,Clearly separated, not mixed.I believe that sketchup in the future will incorporate full screen capabilities,I'm a programmer and a designer, and I want to bulid model quickly,I think Right - click menus are more important than toolbars and shortcut key.Those are my reasons.Customizing personalized functional menus is also convenient and fun, isn't it? ☀

      posted in Developers' Forum
      S
      season_x
    • RE: How can I use "createPopupMenu" to create a right click Menu

      another way, I want to create a new context menu and Make it appear with sketchup context_menu at the same time .I already tried "getmenu" function,but it's just sketchup context_menu.
      anybody know ?

      posted in Developers' Forum
      S
      season_x
    • How can I use "createPopupMenu" to create a right click Menu

      first,I already get sketchup handle "hMainwnd",then I want to create a right-click menu:

      #---------
      def AddPopupMenu(hMainwnd,x,y)
      createPopupMenu = Win32API.new('user32.dll', 'CreatePopupMenu','', 'l')
      appendMenu = Win32API.new('user32.dll', 'AppendMenu','liip', 'b')
      clientToScreen = Win32API.new('user32.dll', 'ClientToScreen','lp', 'b')
      trackPopupMenu = Win32API.new('user32.dll', 'TrackPopupMenu','liiiilp', 'b')

          # point = [0,0]
          hMenu = createPopupMenu.call
          appendMenu.call(hMenu,0x00000000,200,"Move")
          #clientToScreen.call(hMainwnd,point)
          trackPopupMenu.call(hMenu,2,x,y,0,hMainwnd,nil)
      

      end
      def onRButtonUp(flags, x, y, view)
      hMwnd = GetSketchupWmd()
      AddPopupMenu(hMwnd,x,y)
      end
      #--------------------------
      but,when I right_click,Nothing happened on my sketchup!I don't know if this method is right or wrong.

      posted in Developers' Forum
      S
      season_x
    • 1 / 1