Getting values from a DTab panel

How can I do it? I tried doing GetValue() but it returns nil

What do you want the the panel to return ?

Code would help, so we can see how you’re doing it.

@Wizard of Ass
I want the panel to return his name
[lua]
local MenuFrame = vgui.Create(“DFrame”)
MenuFrame:SetSize(ScrW() * 0.95, ScrH() * 0.95)
MenuFrame:SetPos((ScrW() - MenuFrame:GetWide()) / 2, (ScrH() - MenuFrame:GetTall()) / 2)
MenuFrame:SetTitle("Welcome to " … GetHostName())
MenuFrame:SetVisible(true)
MenuFrame:SetDraggable(true)
MenuFrame:ShowCloseButton(true)
MenuFrame:MakePopup()

local MenuPSheet = vgui.Create(“DPropertySheet”)
MenuPSheet:SetParent(MenuFrame)
MenuPSheet:SetPos(13, 50)
MenuPSheet:SetSize(MenuFrame:GetWide() - 25, MenuFrame:GetTall() - 60)

local MOTD = vgui.Create( “DPanel”, MenuFrame )
MOTD:SetPos( 25, 50 )
MOTD:SetSize( 250, 250 )
MOTD.Paint = function()
surface.SetDrawColor( 50, 50, 50, 255 )
surface.DrawRect( 0, 0, MOTD:GetWide(), MOTD:GetTall() )
draw.SimpleText(“bug JohnnyThunders about this”, “Trebuchet18”,MOTD:GetWide() / 10.5, MOTD:GetTall() - 6.2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText(“This doesn’t work yet”, “HUDNumber5”, MOTD:GetWide() / 2, MOTD:GetTall() / 2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end

local Rules = vgui.Create( “DPanel”, MenuFrame )
Rules:SetPos( 25, 50 )
Rules:SetSize( 250, 250 )
Rules.Paint = function()
surface.SetDrawColor( 50, 50, 50, 255 )
surface.DrawRect( 0, 0, Rules:GetWide(), Rules:GetTall() )
draw.SimpleText(“bug JohnnyThunders about this”, “Trebuchet18”,Rules:GetWide() / 10.5, Rules:GetTall() - 6.2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText(“This doesn’t work yet”, “HUDNumber5”, Rules:GetWide() / 2, Rules:GetTall() / 2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end

local AdminList = vgui.Create( “DPanel”, MenuFrame )
AdminList:SetPos( 25, 50 )
AdminList:SetSize( 250, 250 )
AdminList.Paint = function()
surface.SetDrawColor( 50, 50, 50, 255 )
surface.DrawRect( 0, 0, AdminList:GetWide(), AdminList:GetTall() )
draw.SimpleText(“bug JohnnyThunders about this”, “Trebuchet18”,AdminList:GetWide() / 10.5, AdminList:GetTall() - 6.2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText(“This doesn’t work yet”, “HUDNumber5”, AdminList:GetWide() / 2, AdminList:GetTall() / 2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end

local GroupPage = vgui.Create(“HTML”)
GroupPage:SetParent(MenuPSheet)
GroupPage:SetPos( 25, 50 )
GroupPage:SetSize( 250, 250 )
GroupPage:OpenURL(“http://steamcommunity.com/groups/johnnythundersservers”)

MenuPSheet:AddSheet(“MOTD”, MOTD, “gui/silkicons/page”, false, false, “Message of the day”)
MenuPSheet:AddSheet(“Rules”, Rules, “gui/silkicons/exclamation”, false, false, “Rules are listed here”)
MenuPSheet:AddSheet(“Admin List”, AdminList, “gui/silkicons/shield”, false, false, “Admins are listed here”)
MenuPSheet:AddSheet(“Group Page”, GroupPage, “gui/silkicons/group”, false, false, “Group page here”)
[/lua]

Ok the motd seems to work now explain what you want it to do.

What do you want the GetValue() to do change motd change writing or what?

-.-"

I didn’t mention about changing anything, I only want to know a way to get the tab’s name

[lua]local Name = “MOTD”; // Tabs name

local MenuFrame = vgui.Create(“DFrame”)
MenuFrame:SetSize(ScrW() * 0.95, ScrH() * 0.95)
MenuFrame:SetPos((ScrW() - MenuFrame:GetWide()) / 2, (ScrH() - MenuFrame:GetTall()) / 2)
MenuFrame:SetTitle("Welcome to " … GetHostName())
MenuFrame:SetVisible(true)
MenuFrame:SetDraggable(true)
MenuFrame:ShowCloseButton(true)
MenuFrame:MakePopup()

local MenuPSheet = vgui.Create(“DPropertySheet”)
MenuPSheet:SetParent(MenuFrame)
MenuPSheet:SetPos(13, 50)
MenuPSheet:SetSize(MenuFrame:GetWide() - 25, MenuFrame:GetTall() - 60)

local MOTD = vgui.Create( “DPanel”, MenuFrame )
MOTD:SetPos( 25, 50 )
MOTD:SetSize( 250, 250 )
MOTD.Paint = function()
surface.SetDrawColor( 50, 50, 50, 255 )
surface.DrawRect( 0, 0, MOTD:GetWide(), MOTD:GetTall() )
draw.SimpleText(“bug JohnnyThunders about this”, “Trebuchet18”,MOTD:GetWide() / 10.5, MOTD:GetTall() - 6.2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText(“This doesn’t work yet”, “HUDNumber5”, MOTD:GetWide() / 2, MOTD:GetTall() / 2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end

local Rules = vgui.Create( “DPanel”, MenuFrame )
Rules:SetPos( 25, 50 )
Rules:SetSize( 250, 250 )
Rules.Paint = function()
surface.SetDrawColor( 50, 50, 50, 255 )
surface.DrawRect( 0, 0, Rules:GetWide(), Rules:GetTall() )
draw.SimpleText(“bug JohnnyThunders about this”, “Trebuchet18”,Rules:GetWide() / 10.5, Rules:GetTall() - 6.2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText(“This doesn’t work yet”, “HUDNumber5”, Rules:GetWide() / 2, Rules:GetTall() / 2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end

local AdminList = vgui.Create( “DPanel”, MenuFrame )
AdminList:SetPos( 25, 50 )
AdminList:SetSize( 250, 250 )
AdminList.Paint = function()
surface.SetDrawColor( 50, 50, 50, 255 )
surface.DrawRect( 0, 0, AdminList:GetWide(), AdminList:GetTall() )
draw.SimpleText(“bug JohnnyThunders about this”, “Trebuchet18”,AdminList:GetWide() / 10.5, AdminList:GetTall() - 6.2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
draw.SimpleText(“This doesn’t work yet”, “HUDNumber5”, AdminList:GetWide() / 2, AdminList:GetTall() / 2, Color(255,0,0), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)
end

local GroupPage = vgui.Create(“HTML”)
GroupPage:SetParent(MenuPSheet)
GroupPage:SetPos( 25, 50 )
GroupPage:SetSize( 250, 250 )
GroupPage:OpenURL(“http://steamcommunity.com/groups/johnnythundersservers”)

MenuPSheet:AddSheet(Name, MOTD, “gui/silkicons/page”, false, false, “Message of the day”)
MenuPSheet:AddSheet(“Rules”, Rules, “gui/silkicons/exclamation”, false, false, “Rules are listed here”)
MenuPSheet:AddSheet(“Admin List”, AdminList, “gui/silkicons/shield”, false, false, “Admins are listed here”)
MenuPSheet:AddSheet(“Group Page”, GroupPage, “gui/silkicons/group”, false, false, “Group page here”)
[/lua]

You could try DTab:GetText() since its based on DLabel.

To get the tab itself you can wait for garrys update or write a hacky workaround.

You just posted a thread about this.

Either use the beta to test it or wait.