VGUI ListPanel: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<!--<br clear=all>
<div class="boilerplate metadata" id="stub" align=left>&nbsp; &nbsp;''This article is a [[Help:Stubs|stub]]. You can help by [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} adding to it].'' </div>


[[Category:VGUI Controls|L]]
<br clear=all>-->
<div style="text-align: center; background: #B8C6FF; font-weight: bold; margin: 0.1em 10%; padding: 0.1em 0.1em; border: #E5E5E5 2px solid;">
''This article is a [[Help:Stubs|stub]]. You can help by [{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} adding to it].''
</div>
 
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. Valve's MP3 player uses ListPanels.
 
[[Image:SectionedListPanel.jpg|thumb|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.
 
#include <vgui_controls/ListPanel.h>
 
ListPanels can be created via the c++ keyword new with a simple call to ListPanel.
 
vgui::ListPanel* myPanel = new ListPanel(this, "myPanel");
 
== Additional Information ==
 
Additional information and examples can be found by simply looking at the MP3 code, found in mp3player.cpp in the game_controls folder.
 
[[Category:VGUI_Controls|L]]
[[Category:Stubs]]

Revision as of 20:01, 6 June 2009

This article 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. Valve's MP3 player uses ListPanels.

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.

#include <vgui_controls/ListPanel.h>

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

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

Additional Information

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