Can't get DPanelList2 Scrollbar to work..
also how the **** can i get the Scrollbar to work if i only paint only the first DPanelList ?
[lua]
function DFrame()
local DFrame = vgui.Create("DFrame")
DFrame:SetSize(445,310)
DFrame:Center()
DFrame:SetTitle("")
DFrame:MakePopup()
DFrame:SetVisible( true )
DFrame:SetDraggable( true )
DFrame:ShowCloseButton( true )
local DPanelList1 = vgui.Create( "DPanelList", DFrame )
DPanelList1:EnableVerticalScrollbar( true )
DPanelList1:EnableHorizontal( true )
DPanelList1:SetPadding( 5 )
DPanelList1:SetPos(5,27)
DPanelList1:SetSize(435, 136.5)
DPanelList1.Paint = function()
draw.RoundedBox( 6, 0, 0, DPanelList1:GetWide(), DPanelList1:GetTall(), Color( 50, 50, 50, 225 ) )
end
local DPanelList2 = vgui.Create( "DPanelList", DFrame )
DPanelList2:EnableVerticalScrollbar( true )
DPanelList2:EnableHorizontal( true )
DPanelList2:SetPadding( 5 )
DPanelList2:SetPos(5, 168.5)
DPanelList2:SetSize(435, 136.5)
DPanelList2.Paint = function()
draw.RoundedBox( 6, 0, 0, DPanelList1:GetWide(), DPanelList1:GetTall(), Color( 50, 50, 50, 225 ) )
end
local button1 = vgui.Create( "DButton", DPanelList2 )
button1:SetSize( 425, 100)
button1:SetPos( 5, 0 )
button1:SetText( "Test Button" )
button1.DoClick = function( button )
Msg( "Button 1\n" )
end
local button2 = vgui.Create( "DButton", DPanelList2 )
button2:SetSize( 425, 200 )
button2:SetPos( 5, 105 )
button2:SetText( "Test Button" )
button2.DoClick = function( button )
Msg( "Button 2\n" )
end
end
concommand.Add( "DFrame", DFrame )
[/lua]
Are you using windows xp?
no, i am using Vista, i got a server to.. hosted by clanbaselive.com should i upload it, and test it there?
[editline]10:54PM[/editline]
I just uploaded and try it on my server not working ..
any..?
Use panels inside of the panellist, then hide them if you don't need them. After that you can parent your buttons to the panels and the panellist will display the scrollbar.
Sorry, you need to Log In to post a reply to this thread.