Can't explain; see screenshot

http://cloud-4.steamusercontent.com/ugc/32986361076545707/C4F6EFF6117D64838CF14A38260C70DF0BE46054/

How do I make the data from one tab >>NOT<< transfer to another tab?

Have you parented the elements to the tab?
Example:
[lua]
local parent = vgui.Create( “DFrame” )
local child = vgui.Create( “DScrollPanel”, parent )
[/lua]

Make sure you parent your elements to the tab’s panel and not the DFrame.

I have.

Use code tags:

[noparse]



-- your code here
function() print("Hello World!") end


[/noparse]


-- your code here
function() print("Hello World!") end

You would actually be better off with these…
[noparse]
[LUA]
[/LUA]
[/noparse]

[editline]20th February 2015[/editline]

Also like Willox said, you need to parent the components to the tabs panel, and it looks like you need to create panels for them.

[LUA]
local base = vgui.Create( “DFrame” )
base:SetPos( ScrW() * 0.5, ScrH() * 0.5 )
base:SetSize( 300, 200 )
base:SetTitle( “ZORMOD” )
base:MakePopup()

local _base = vgui.Create( “DPropertySheet”, base )
_base:SetPos( 10, 30 )
_base:SetSize( 280, 160 )

local sheet1 = vgui.Create( “DPanel”, _base )
sheet1:Dock(FILL)

local godmode = vgui.Create( “DCheckBoxLabel”, sheet1)
godmode:SetPos( 0, 5 )
godmode:SetConVar( “sbox_godmode” )
if GetConVar(“sbox_godmode”) == 0 then
godmode:SetValue( 0 )
end
godmode:SetText( “Toggle Godmode” )
godmode:SizeToContents()

_base:AddSheet( “Commands”, sheet1, “icon16/user.png”, false, false, “Simple commands for ZORMOD.” )
[/LUA]



local base = vgui.Create( "DFrame" )
base:SetPos( ScrW() * 0.5, ScrH() * 0.5 )
base:SetSize( 300, 200 )
base:SetTitle( "ZORMOD" )
base:MakePopup()

local _base = vgui.Create( "DPropertySheet", base )
_base:SetPos( 10, 30 )
_base:SetSize( 280, 160 )

local sheet1 = vgui.Create( "DPanel", _base )
sheet1:Dock(FILL)

local godmode = vgui.Create( "DCheckBoxLabel", sheet1)
godmode:SetPos( 0, 5 )
godmode:SetConVar( "sbox_godmode" )
if GetConVar("sbox_godmode") == 0 then
    godmode:SetValue( 0 )
end
godmode:SetText( "Toggle Godmode" )
godmode:SizeToContents()

_base:AddSheet( "Commands", sheet1, "icon16/user.png", false, false, "Simple commands for ZORMOD." )


Tell me which is better.

Edit: okay usually [noparse]


[/noparse] tags achieve better results for some reason. In this case they are the same. Either way, you can't say one is better than the other.
Sadly I can't check in the preview what it looks like...

I think it’s more of a personal preference to the community, I also think it colors the syntax differently. But choose which you more prefer.

We need some authoritative word on the subject.

Said authoritative word should also mention why the syntax highlighting is so inconsistent.

Lol you don’t need an authoritative word, as long as it’s in some kind of code tags, you’ll be fine.

I’m really interested to know why the coloring is so fucked :wink:

Well if you do, send me a PM about if you have the time to. :smile:

[editline]20th February 2015[/editline]

Lol why do I get a dumb tag for? Just going to call us dumb, and not even say anything…

I think it’s for getting sidetracked, and oh look! we’re getting even more sidetracked! :v:

You’re creating a new tab for one checkbox and one label, the rest are only parented to the DPropertySheet panel, resulting in them transferring over to all other tabs.

[lua]
– \¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯// –
— \ ZORMOD: A simple administration modification // —
---- \ developed singlehandedly by Zormonic. // ----
----- \____________________________________________// -----

concommand.Add( “zormod_menu”, function()

local base = vgui.Create( “DFrame” )
base:SetPos( ScrW() * 0.5, ScrH() * 0.5 )
base:SetSize( 300, 200 )
base:SetTitle( “ZORMOD” )
base:MakePopup()

local _base = vgui.Create( “DPropertySheet”, base )
_base:SetPos( 10, 30 )
_base:SetSize( 280, 160 )

local panel1 = vgui.Create( “DPanel”, _base )
panel1:SetPos( 0, 0 )
panel1.Paint = function() end

local godmode = vgui.Create( “DCheckBoxLabel”, panel1 )
godmode:SetPos( 0, 5 )
godmode:SetConVar( “sbox_godmode” )
if GetConVar(“sbox_godmode”) == 0 then
godmode:SetValue( 0 )
end
godmode:SetText( “Toggle Godmode” )
godmode:SizeToContents()

local wacaircraftgod = vgui.Create( “DCheckBoxLabel”, panel1 )
wacaircraftgod:SetPos( 0, 50 )
wacaircraftgod:SetConVar( “wac_air_nodamage” )
if GetConVar(“wac_air_nodamage”) == 0 then
godmode:SetValue( 0 )
end
wacaircraftgod:SetText( “Toggle WAC Godmode” )
wacaircraftgod:SizeToContents()

local nocheat1 = vgui.Create( “DCheckBoxLabel”, panel1 )
nocheat1:SetPos( 8, 73 )
nocheat1:SetConVar( “sv_allowdownload” )
if GetConVar(“sv_allowdownload”) == 0 then
nocheat1:SetValue( 0 )
end
nocheat1:SetValue( 0 )
nocheat1:SetText( “Toggle Anti-Cheat 1” )
nocheat1:SizeToContents()

local nocheat2 = vgui.Create( “DCheckBoxLabel”, panel1 )
nocheat2:SetPos( 8, 96 )
nocheat2:SetConVar( “sv_allowcslua” )
if GetConVar(“sv_allowcslua”) == 0 then
nocheat2:SetValue( 0 )
end
nocheat2:SetValue( 1 )
nocheat2:SetText( “Toggle Anti-Cheat 2” )
nocheat2:SizeToContents()

local helpnote1 = vgui.Create( “DLabel”, panel1 )
helpnote1:SetPos( 8, 119 )
helpnote1:SetText( “(ANTI-CHEAT 1 & 2) Defaulting to off, which means it is” )
helpnote1:SizeToContents()

local helpnote2 = vgui.Create( “DLabel”, panel1 )
helpnote2:SetPos( 8, 125 )
helpnote2:SetText( “enabled. Turning it on will disable the anti-cheat.” )
helpnote2:SizeToContents()

local panel2 = vgui.Create( “DPanel”, _base )
panel2:SetPos( 0, 0 )
panel2.Paint = function() end

local helpnote3 = vgui.Create( “DLabel”, panel2 )
helpnote3:SetPos( 8, 25 )
helpnote3:SetText( “Developer Zormonic” )
helpnote3:SizeToContents()

_base:AddSheet( “Commands”, panel1, “icon16/user.png”, false, false, “Simple commands for ZORMOD.” )
_base:AddSheet( “Credits”, panel2, “icon16/shield_go.png”, false, false, “Credits for making this beautiful simple addon.” )

end )
[/lua]

What you needed to do was create two seperate panels and parent the checkboxes and labels to those, and make the tabs use the panels. I didn’t fix the positioning, just the panels and the labels.

You can’t use
in a label without it messing up, so just create a new label for the text you want to newline – which I did as an example in the helptext1.

Code boxes rely on this for language detection (even the Lua tag ones):



 function WorkOutLanguage( txt )
{
	var arry = new Array();
	
	//
	// lua
	//
	var score = 0;
		score += NumOccur( txt, "self:" );
		score += NumOccur( txt, "\\-\\- " );
		score += NumOccur( txt, "function ENT\\:" );
		score += NumOccur( txt, "function GM\\:" );
		score += NumOccur( txt, "\\) do" );
		score += NumOccur( txt, "\\) then" );
		score += NumOccur( txt, "hook\\.Add" );
		score += NumOccur( txt, "then return" );
	arry.push( { name: "lua", score: score } );
	
	//
	// c#
	//
	var score = 0;
		score += NumOccur( txt, "using System" );
		score += NumOccur( txt, "public class " );
		score += NumOccur( txt, "private class " );
		score += NumOccur( txt, "public float " );
		score += NumOccur( txt, "private float " );
		score += NumOccur( txt, "public bool " );
		score += NumOccur( txt, "private bool " );
		score += NumOccur( txt, "Time.deltaTime" );
		score += NumOccur( txt, "rigidbody.AddForce\\(" );
		score += NumOccur( txt, "Vector3.forward" );
		score += NumOccur( txt, "Vector3.right" );
	arry.push( { name: "csharp", score: score } );
	
	//
	// c (default)
	//
	var score = 1;
	
	arry.push( { name: "c", score: score } );

	arry.sort(function(a,b) 
	{
		return a.score < b.score;
	});
	
	return arry[0].name;
}