• Editable panels
    10 replies, posted
  • Avatar of Megolas
  • Hey, I'm working on a gamemode and as a part of it I created custom panels in vgui. Later, I wanted to use DTextEntry, but i can't - the wiki says you can only use it when one of the parents is an "Editable Panel" (Dafuq is that?). How do I make my own panels editable?
  • Avatar of TaintedTurnip
  • Probably means [url=http://bananatree.im/wiki/wiki.garrysmod.com/indexb2dd.html?title=DPanel]THIS[/url]
  • Avatar of Megolas
  • no... Anyway - tried to deriving it from EditablePanels (like DFrames) and it didnt work...
  • Avatar of zzaacckk
  • Well for a DTextEntry to work it needs to be focused.. I will assume that Garry called it 'editable' for convenience. Also, you should show both parts of your code, errors can be misleading sometimes.
  • Avatar of Megolas
  • The panel code is long, which part should i post? And the frame that uses it is: local dte = vgui.Create("DTextEntry", THECUSTOMFRAME) dte:SetSize(250,20) dte:SetPos(135,365)
  • Avatar of brandonj4
  • [QUOTE=Megolas;35926029]The panel code is long, which part should i post? And the frame that uses it is: local dte = vgui.Create("DTextEntry", THECUSTOMFRAME) dte:SetSize(250,20) dte:SetPos(135,365)[/QUOTE] SetSize doesn't exist for DTextEntry I would advise you to look at the wiki if you have any derma problems. [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index5fee.html?title=DTextEntry"]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index5fee.html?title=DTextEntry[/URL] You would use: [lua] local dte = vgui.Create("DTextEntry", THECUSTOMFRAME) dte:SetPos(135,365) dte:SetWide(220) dte:SetTall(20) [/lua] For future reference [U]TextEntry[/U] uses [U]SetSize[/U].
  • Avatar of Megolas
  • thanks - but it did work and it didnt error... Also, the wiki shows SetSize...
  • Avatar of brandonj4
  • [QUOTE=Megolas;35928752]thanks - but it did work and it didnt error... Also, the wiki shows SetSize...[/QUOTE] The wiki shows SetSize for TextEntry not "D" for derma TextEntry.