• Changing the width of a DNumSlider
    5 replies, posted
Long story short, working on something, need derma panels, can't resize a slider for some reason, probably because it has been modified from its original. The wiki isn't helping, so I'm counting on you lovely people at Facepunch. Code: [lua] local maxlogs_slider = vgui.Create( "DNumSlider", base ) maxlogs_slider:SetText( "Maximum number of logs\nthe server will store" ) maxlogs_slider:SetMinMax( 0, 350 ) maxlogs_slider:SetDecimals( 0 ) maxlogs_slider:SetValue( GetGlobalInt("eventlog_maxlogs") ) maxlogs_slider:SetConVar( "eventlog_maxlogs" ) [/lua] Result: [URL=http://imgur.com/b4OrvLA][IMG]http://i.imgur.com/b4OrvLA.jpg[/IMG][/URL] A quick fix (if there is a fix) would be much appreciated.
Have you tried Panel:SetWide or Panel:SetSize?
[QUOTE=Robotboy655;40527119]Have you tried Panel:SetWide or Panel:SetSize?[/QUOTE] Nada.
[QUOTE=Internet1001;40527301]Nada.[/QUOTE] No idea what that means, but what you should do is add a DPanel to the DPropertySheet and add you slider the that DPanel.
[QUOTE=Robotboy655;40527331]No idea what that means, but what you should do is add a DPanel to the DPropertySheet and add you slider the that DPanel.[/QUOTE] Nada is Spanish for "nothing". Now you know and knowing is half the battle. GI-J- no, I'm not gonna do that to you. Thanks anyway XD. I will try your new method.
Thanks, it works, but it doesn't look amazing. Oh well, I'll worry about the cosmetics later. Thanks for your help.
Sorry, you need to Log In to post a reply to this thread.