Revision Difference
DDragBase#550084
<panel>
<parent>DPanel</parent>
<realm>Client and Menu</realm>⤶
<description>
<internal></internal>
⤶
A VGUI base panel providing drag/drop functionality. Used by <page>DIconLayout</page>, <page>DListLayout</page> and <page>DTileLayout</page>.
<internal></internal>
⤶
A VGUI base panel providing drag/drop functionality. Used by <page>DIconLayout</page>, <page>DListLayout</page> and <page>DTileLayout</page>.
</description>
⤶
</panel>⤶
<overrides>⤶
<page>Panel:Init</page>⤶
</overrides>⤶
</panel>⤶
<example>
<code>
local frame = vgui.Create( "DFrame" )
frame:SetSize( 300, 500 )
frame:Center()
frame:MakePopup()
local dragbase = vgui.Create( "DDragBase", frame )
dragbase:Dock( FILL )
dragbase:MakeDroppable( "test" )
dragbase:SetDropPos( "82" )
for i = 0, 10 do
local butt = dragbase:Add( "DButton" )
--butt:Dock( TOP )
butt:SetPos( 25, i * 25 )
butt:SetWidth( 100 )
butt:Droppable( "test" )
butt.id = i
butt.Think = function( s ) s:SetText( "ID: " .. i .. " ZPOS: " .. s:GetZPos() ) end
end
</code>
</example>