For some reason when using this code:
[lua]function adde()
local steamid ={}
local TestingComboBox = vgui.Create( "DComboBox", DermaFrame )
TestingComboBox:SetPos( 10, 35 )
TestingComboBox:SetSize( 100, 185 )
TestingComboBox:SetMultiple( false ) -- Don't use this unless you know extensive knowledge about tables
for k,v in pairs(player.GetAll()) do
steamid[v:Nick()] = v:SteamID()
--DermaListView:AddLine(v:Nick(),v:Frags()) -- Add lines
TestingComboBox:AddItem( v:Nick() )
end
-- TestingComboBox:AddItem( "Add" ) -- Add our options
-- TestingComboBox:AddItem( "Some" )
-- TestingComboBox:AddItem( "Options" )
-- TestingComboBox:AddItem( "Here" )
local MainMenuSheet = vgui.Create( "DPanel", DermaFrame ) -- We create a panel so we can draw shit on; if we use the frame, it comes up transparent for some reason
MainMenuSheet:SetPos( 125, 50 )
MainMenuSheet:SetSize( DermaFrame:GetWide() - 25, DermaFrame:GetTall() - 25 )
MainMenuSheet.Paint = function()
if TestingComboBox:GetSelectedItems() and TestingComboBox:GetSelectedItems()[1] then -- make sure something is selected if not we get uber spam of errors
local OurStringThing = "Your selection is: "..TestingComboBox:GetSelectedItems()[1]:GetValue().."! Which is: " .. steamid[ ComboBox:GetSelectedItem():GetValue() ] -- This was a pain in the ass to figure out; this gets the name of the option chosen
surface.SetFont( "default" )
surface.SetTextColor( 255, 255, 255, 255 )
surface.SetTextPos( 50, 50 )
surface.DrawText( OurStringThing ) -- Draws the text
end
end
end[/lua]
it comes up with this:
[IMG]http://img641.imageshack.us/img641/897/gmflatgrass0001.jpg[/IMG]
Why is the frame invisible?
Because you never created it.
How would i go about fixing it? I tried a bit but i failed...
local DermaFrame = vgui.Create("DFrame")
and all the other code you'll need to write for it.
Remember and do this : [lua] DermaFrame:SetVisible(true) [/lua] when you created the DermaFrame
[QUOTE=gh0strec0n;19879679]Remember and do this : [lua] DermaFrame:SetVisible(true) [/lua] when you created the DermaFrame[/QUOTE]
Not necessary, as frames are visible by default.
it was created to distract us from the real issue
:ninja:health care reform:ninja:
Sorry, you need to Log In to post a reply to this thread.