• Is there a way to move tabs around within a DFrame?
    5 replies, posted
I would like to move the tabs to the left of the Frame rather than the TOP. function BR.Menu()     BR.MenuFrame = vgui.Create("DFrame")     BR.MenuFrame:SetPos(100,100)     BR.MenuFrame:SetSize(600,435)     BR.MenuFrame:SetTitle("BRPanel")     -- BR.MenuFrame:SetBackgroundBlur(true)     BR.MenuFrame.Paint = function()         surface.SetDrawColor( 0, 59, 70, 255)         surface.DrawRect( 0, 0, BR.MenuFrame:GetWide(), BR.MenuFrame:GetTall( ))        end     BR.MenuFrame:MakePopup() local PG = vgui.Create( "DPropertySheet", BR.MenuFrame ) PG:Dock( LEFT ) PG:SetParent( BR.MenuFrame )   PG:SetPos( 5, 25 ) PG:SetSize( 590, 400 ) PG.Paint = function()         surface.SetDrawColor( 102, 166, 173, 255)         surface.DrawRect( 0, 0, PG:GetWide(), PG:GetTall( ))        end local content = vgui.Create( "DLabel", PG ) content:SetPos( 0, 0 ) content:SetText( "" ) local y = 30 PG:AddSheet( "Tab1", content, "icon16/user.png", false, false, "Tab1" ) local content = vgui.Create( "DLabel", PG ) content:SetPos( 0, 0 ) content:SetText( "" ) local y = 30 PG:AddSheet( "Tab2", content, "icon16/user.png", false, false, "Tab2" ) local content = vgui.Create( "DLabel", PG ) content:SetPos( 0, 0 ) content:SetText( "" ) PG:AddSheet( "Tab3", content, "icon16/user.png", false, false, "Tab3" ) end This is the Code i am using for the panel, https://files.facepunch.com/forum/upload/182522/a65371a8-aa55-46a1-8a18-e9255bbdc4ae/image.png This is what it looks like i would like to move "Tab1,Tab2,Tab3" to the left of the Panel.
surely its just using SetPos for each of the sections?
How would i do that as Addsheet has no args for position
https://github.com/Facepunch/garrysmod/blob/master/garrysmod/lua/vgui/dpropertysheet.lua#L143 you have to access this panel. Panel/SetContentAlignment may work.
sadly it wont let me parent the tab to the HorizontalScroller
Mm... What? If this doesn't work, you can try another positioning methods local sheet = vgui.Create("DPropertySheet", whateverParent) sheet.tabScroller:SetContentAlignment(9)
Sorry, you need to Log In to post a reply to this thread.