• How to set ColorText to this DComboBox ?
    0 replies, posted
Hi, I can't have the desired color text of this DComboBox but when I add surface.SetTextColor I can just add a text over the DComboBox. Any idea ? [IMG]http://img519.imageshack.us/img519/7323/61776406.png[/IMG] [lua]local TestingComboBox = vgui.Create( "DComboBox", TestingPanel ) TestingComboBox:SetPos( 10, 10 ) TestingComboBox:SetSize( 80, 90 ) TestingComboBox:SetMultiple( false ) -- <removed sarcastic and useless comment> TestingComboBox:AddItem( "Add" ) -- Add our options TestingComboBox:AddItem( "Some" ) TestingComboBox:AddItem( "Options" ) TestingComboBox:AddItem( "Here" ) TestingComboBox.Paint = function() surface.SetTextPos( 10, 10 ) surface.DrawText( "This is a text example" ) surface.SetTextColor( 255, 255, 255, 255 ) draw.RoundedBox( 0, 0, 0, TestingComboBox:GetWide(), TestingComboBox:GetTall(), Color( 255, 255, 255, 0 ) ) end[/lua]
Sorry, you need to Log In to post a reply to this thread.