ModuleListPage.InitializeListPage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
When overridden in a derived class, initializes the list view for the page.
protected:
abstract void InitializeListPage();
protected abstract void InitializeListPage ();
abstract member InitializeListPage : unit -> unit
Protected MustOverride Sub InitializeListPage ()
Examples
The following example implements the InitializeListPage method.
protected override void InitializeListPage() {
TableLayoutPanel tblLayPanl = getConfiguredTPL();
try {
ListViewContainer.SuspendLayout();
tblLayPanl.SuspendLayout();
// get a new label with all properties set
tblLayPanl.Controls.Add(getMyLabel());
// get a new ComboBox with all properties set
tblLayPanl.Controls.Add(getMyComboBx());
} finally {
ListViewContainer.ResumeLayout();
tblLayPanl.ResumeLayout();
}
_keyHeader = getColHdr("key ");
ListView.Columns.AddRange(new ColumnHeader[] {
_keyHeader,
getColHdr("Value "),
getColHdr("Local "),});
ListView.MultiSelect = false;
ListView.ShowGroups = true;
ListView.SizeChanged += new
EventHandler(ListView_SizeChanged);
}
Remarks
This method initializes the System.Windows.Forms.ListView object when you first create a list view page. Typically, this method will add columns, assign images to items, and hook up event handlers to the events on the System.Windows.Forms.ListView.