• Unable to open menu on a DListView.
    5 replies, posted
Sorry the title isnt the best description, Basically i cant work this out. Basically, I have a right click menu in my derma. [url]http://prntscr.com/a3dz51[/url] However my problem is, When i right click a row, The menu doesnt open? How do i fix this so it opens the menu aswell as selecting that row? [CODE]local mcode = 108 function statsList:OnMousePressed(mouseCode) if mouseCode == mcode then local rightMenu = vgui.Create("DMenu") rightMenu:AddOption("Add points") rightMenu:Open() end end[/CODE] Thanks in advance!
Code?
[QUOTE=Kevlon;49743416]Code?[/QUOTE] Edited thread, My bad.
What is statsList supposed to be?
[QUOTE=MPan1;49744202]What is statsList supposed to be?[/QUOTE] statsList is the DList.
OnRowRightClick actually exists, its not present in the wiki -- heres from the source of gmod: [code] --[[--------------------------------------------------------- Name: OnRowRightClick -----------------------------------------------------------]] function PANEL:OnRowRightClick( LineID, Line ) -- For Override end [/code] Can be found under "[B]/lua/vgui/dlistview.lua[/B]".
Sorry, you need to Log In to post a reply to this thread.