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?
Latest posts made by season_x
-
RE: How can I use "createPopupMenu" to create a right click Menu
-
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 ? -
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.