VGUI SectionedListPanel

From Valve Developer Community
Revision as of 11:34, 7 June 2009 by Ring2ding (talk | contribs)
Jump to: navigation, search

This article is a stub. You can help by adding to it.

A SectionedListPanel is a vgui2 element defined in the vgui_controls library, in the file SectionedListPanel.cpp. SectionedListPanels are available in all source games. SectionedListPanels, as the name suggests, are useful for listing sectioned groups of information. The standard scoreboard was created using a SectionedListPanel, and thus represents a good example of the SectionedListPanel's capabilities.

This screenshot represents valve's default scoreboard which was built using a SectionedListPanel.

Example Usage

Before creating anything, we first need to include the SectionedListPanel header file.

#include <vgui_controls/SectionedListPanel.h>

SectionedListPanels can be created via the c++ keyword new with a simple call to SectionedListPanel.

vgui::SectionedListPanel* myPanel = new SectionedListPanel(this, "myPanel");

Additional Information

Additional information and examples can be found by simply looking at the scoreboard code, found in ClientScoreBoardDialog.cpp in the game_controls folder.