For DarkRP, I am making a F1 Information Menu. It has rules on it and I have about 45 of them. In-game, it only shows 20. I tried making my derma menu and panel bigger but it still shows 20. Then I tried using verticle scroll bar but it just returns as a nil value.
[lua]
local HelpVGUI
local function ToggleHelp()
MainMenu = vgui.Create( "DFrame" )
MainMenu:SetPos( 50, 50 )
MainMenu:SetSize( 360, 455 )
MainMenu:SetTitle( "F1 Menu" )
MainMenu:SetBackgroundBlur( false )
MainMenu:SetVisible( true )
MainMenu:SetDraggable( false )
MainMenu:ShowCloseButton( false )
MainMenu:MakePopup()
PropertySheet = vgui.Create( "DPropertySheet")
PropertySheet:SetParent( MainMenu )
PropertySheet:SetPos( 5, 30 )
PropertySheet:SetSize( 350, 340 )
local DermaButton = vgui.Create( "DButton", DermaPanel )
DermaButton:SetText( "Close" )
DermaButton:SetSize( 165, 75 )
DermaButton:SetPos( 95, 373 )
DermaButton:SetParent( MainMenu )
DermaButton.DoClick = function()
MainMenu:Close()
end
local TabOne = vgui.Create( "DPanel" )
TabOne:SetVisible( true )
local Info = vgui.Create("DLabel", TabOne)
Info:SetText( [[
1. No Prop Blocking.
2. No Prop Climbing.
3. No Prop Killing.
4. No Prop Surfing.
5. No Random DeathMatching.
6. No breaking NLR.
7. Respect all users.
8. Do not abuse jobs. IE: Joining a gang as a cop, Etc.
7. Do not abuse /job. IE: Killer, Assassin, Hitman, Mercenary, Terrorist Etc.
8. No Meta-Gaming.
9. Do not abuse /advert. IE: Using /advert just to talk and not advertise.
10. Use your Common Sense, don't try to loophole the fucking rules.
11. Do not spam the chatbox.
12. Do not voice spam.
13. Do not prop spam.
14. Do not use Hacks.
15. Do not use Client-side scripts that give an advantage over regular players.
16. Do not advertise other servers.
17. No Prop Pushing.
18. Do not spray innopropiate, disguisting, fowl sprays.
19. Do not randomly jail kill.
20. Do not make prop tunnels.
21. Do not build huge bases.
22. Do not sell job slots.
23. Do not buy multiple buildings to sell to people.
24. Do not random demote.
25. Do not block off spawn points.
26. Do not randomly arrest people.
27. Do not randomly want/warrant people.
28. ONLY USE DEADLY FORCE WHEN BEING SHOT AT.
29. Do not randomly shoot cops because there cops.
30. Do not randomly shoot gangsters because there gangsters.
31. You are allowed to block off Microwaves and Gunlabs.
32. Do not use exploits.
33. Do not make prop mazes.
34. Do not randomly kill the mayor
35. Money Printers and drugs are always illegal.
36. If you are a Cop/Mayor, You cannot hoard someone elses illegal entities.
37. Do not prop trap.
38. Do not create bases above the ground.
39. Do not pocket world props and throw them in the street. It just pisses people off.
40. Do not have your own props standing in the street.
41. Do not abuse door swep. IE: Puting 50 doors in one spot.
42. You must have a keypad/button for your Door swep.
43. Do not become a class just for the player model.
44. Only 1 keypad is allowed per door.
45. Follow the Rules.
]]
)
Info:SetTextColor( Color( 0, 0, 0, 255 ) )
Info:SetPos( 5, 20 )
Info:SizeToContents( )
local TabThree = vgui.Create( "DPanel" )
TabThree:SetVisible( true )
local Info = vgui.Create("DLabel", TabThree)
Info:SetText( [[
Website:
]]
)
Info:SetTextColor( Color( 0, 0, 0, 255 ) )
Info:SetPos( 5, 20 )
Info:SizeToContents( )
local TabTwo = vgui.Create( "DPanel" )
TabTwo:SetVisible( true )
local Info = vgui.Create("DLabel", TabTwo)
Info:SetText( [[
Q: Where can I find the laws?
A: Press F4.
Q: What does RDM/NLR/Prop block mean?
A: Press F4 and go to the "Definitions" tab.
Q: How do I become an admin?
A: Stay active on the server/forums, get respect, and don't break any rules!
Q: Someone is breaking the rules!
A: Get an admin, if you cannot get hold of an admin,
then register on the forums and post a ban request!
Q: I love this server.
A: That's awesome!
]]
)
Info:SetTextColor( Color( 0, 0, 0, 255 ) )
Info:SetPos( 5, 20 )
Info:SizeToContents( )
PropertySheet:AddSheet( "Rules", TabOne, "gui/silkicons/shield", false, false, "Rules!" )
PropertySheet:AddSheet( "Website", TabTwo, "gui/silkicons/world", false, false, "Admins!" )
PropertySheet:AddSheet( "F.A.Q/Help", TabThree, "gui/silkicons/page", false, false, "Donate!" )
end
usermessage.Hook("ToggleHelp", ToggleHelp)[/lua]
Anything I can do?
DPanelList and enable the vertical scroll bar, I think that will work.
[lua]PropertySheet:EnableVerticalScrollbar( true )[/lua]
Doesn't work. Still returning as nil.
No no, as in your content that you want to be displayed with scrollbar needs to be placed inside of a DPanelList and then set DPanelList.EnableVerticalScrollbar to true.
So I should replace the Dpanels with Dpanellist? If not I just do vgui.Create( "DPanelList", Tabone )?
What's with your tabbing?
[QUOTE=Jova;26439934]DPanelList and enable the vertical scroll bar, I think that will work.[/QUOTE]
i think it does actually
[QUOTE=Engrish Please;26441826]So I should replace the Dpanels with Dpanellist? If not I just do vgui.Create( "DPanelList", Tabone )?[/QUOTE]
Not quite -- in general, what I've done is made a DPanel that serves as a parent and is the one placed in each tab. Then you could add things to the DPanel, like a DPanelList or other derma objects. So add the panel to the sheet, but place objects inside the panel.
Sorry, you need to Log In to post a reply to this thread.