Moderator elections are being held. See Valve Developer Community:Moderator elections for more details.
Users who would like to run for moderator must be autoconfirmed and have at least 100 edits. Users can check their own edit count at Special:Preferences.
The Message template has been deleted. A list of pages that transclude it are at Valve Developer Community:Message transclusions.

VGUI ListPanel

From Valve Developer Community
Jump to: navigation, search

Stub

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

A ListPanel is a vgui2 element defined in the vgui_controls library, in the file ListPanel.cpp. ListPanels are available in all source games. ListPanels are used for listing information in a tabular format.

This is a screenshot of a ListPanel used in Valve's MP3 player.

Example Usage

Before creating anything, we first need to include the ListPanel header file and use the vgui namespace.

#include <vgui_controls/ListPanel.h>
using namespace vgui;

ListPanels can be created via the c++ keyword new with a simple call to ListPanel.

ListPanel* myPanel = new ListPanel(this, "myPanel");

Additional Information

Additional information and examples can be found by looking at the MP3 code, found in mp3player.cpp in the game_controls folder.