• DComboBox On certain option chosen if statement
    1 replies, posted
How would I make it so if a certain choice from the DComboBox is selected it would for example draw a rounded box Heres the code for the ComboBox [CODE] local combo = vgui.Create("DComboBox", DermaPanel) combo:SetSize(100,20) combo:SetPos(95,85) combo:SetValue("Colors") combo:AddChoice("Blue and White") combo:AddChoice("Orange and White") combo:AddChoice("Black and White") combo.OnSelect = function( panel, index, value) print( value .." was selected!") end [/CODE]
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/DComboBox/OnSelect]DComboBox:OnSelect[/url]
Sorry, you need to Log In to post a reply to this thread.