Location: PHPKode > scripts > hnwb_ListView for WinBinder > hnwb_listview-for-winbinder/doc/hnwb_ListView.doc.html
<?xml version="1.0" encoding="windows-1252"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>PHP-Class to handle WinBinder-ListViews</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1252" />
<meta http-equiv="content-language" content="en" />
<meta name="language" content="en" />
<meta name="description" content="This is a short documentation on how to use the hnwb_ListView-PHP-Class and what it supports. It makes it very easy and comfortable to handle (also different) ListViews with the WinBinder PHP-Extension." />
<meta name="keywords" content="winbinder, listview, php, class, extension, control, sorting, descending, ascending, easy, comfortable" />
<meta name="author" content="Horst Nogajski" />
<meta name="copyright" content="Horst Nogajski" />
<meta name="publisher" content="Horst Nogajski" />
<meta name="audience" content="all" />
<meta name="distribution" content="all" />
<meta name="robots" content="index,follow" />
<meta http-equiv="imagetoolbar" content="no" />

<style type="text/css">
<!--
body,html,a,p,h1,h2,h3,h4,h5,h6,ol,ul,li,td,th {
	font-family: Verdana,Helvetica,Arial,sans-serif;
}
a {
	font-size: 1em;
	text-decoration: underline;
	color: #333333;
	background-color: #CBF3D7;
}
a:link {
	color: #0079C5;
	background: transparent;
	text-decoration: none;
}
a:visited {
	color: #5DA3ED;
	background: transparent;
	text-decoration: none;
}
a:hover,a:active,a:focus {
	color: #cd3021;
	background: transparent;
	text-decoration: underline;
}


html,body {
	margin-top: 20px;
	margin-bottom: 20px;
	margin-left: 20px;
	margin-right: 20px;
	padding-top: 0px;
	padding-bottom: 0px;
	padding-left: 0px;
	padding-right: 0px;
}
body {
	background-color: #FFFFFF;
	color: #000000;
}

h1 {
	margin-left: 30px;
	margin-right: 10px;
	background: transparent;
	color: #222222;
	font-size: 1.3em;
	font-style: normal;
	font-weight: bold;
	line-height: 100%;
	letter-spacing: 1px;
}
h3 {
	margin-top: 20px;
	margin-left: 30px;
	margin-right: 5px;
	background: transparent;
	color: #000000;
	font-size: 1em;
	font-style: normal;
	font-weight: bold;
	line-height: 100%;
}
p {
	margin-left: 30px;
	margin-right: 20px;
	font-size: 0.8em;
	font-style: normal;
	font-weight: normal;
	background: transparent;
	color: #000000;
}
p.small {
	font-size: 0.6em;
	text-decoration: none;
	color: #000000;
}
li {
	font-size: 0.8em;
	font-style: normal;
	font-weight: normal;
	background: transparent;
	color: #000000;
}

.phpclass
{
	margin-left: 30px;
	margin-right: 20px;
	font-size: 14px;
	font-weight: bold;
}

img {
	margin-top: 12px;
	margin-bottom: 12px;
	margin-left: 15px;
	margin-right: 15px;
}

div.box {
	margin-left: 30px;
	margin-right: 30px;
	margin-top: 40px;
	margin-bottom: 20px;
	border: dashed 2px #FFD940;
}
div.code {
	font-family: MonoSpace, Courier;
	font-size: 0.8em;
	background-color: #EEEEEE;
	margin-left: 30px;
	margin-right: 30px;
	margin-top: 20px;
	margin-bottom: 20px;
	padding-top: 10px;
	padding-bottom: 10px;
	padding-left: 10px;
	padding-right: 10px;
	border: dashed 1px gray;
}
-->
</style>
</head>
<body>

<h3>PHP-Class :: hnwb_ListView :: Documentation</h3>
<p>Author:&nbsp;&nbsp;&nbsp;&nbsp;Horst Nogajski<br />
Licence:&nbsp;&nbsp;&nbsp;LGPL (http://www.opensource.org/licenses/lgpl-license.html)<br />
Version:&nbsp;&nbsp;&nbsp;1.0&nbsp;BETA&nbsp;&nbsp;(2007-01-03)</p>

<p class="phpclass">You can download the class at <a href="http://hn273.users.phpclasses.org/browse/package/3621.html">phpclasses.org</a>!</p>

<p class="phpclass"><a href="../"><b>UP</b></a> <small>(to the list)</small></p>



<div class="box">
<h3>hnwb_ListView is a PHP-Class to handle WinBinder-ListViews</h3>
<p>WinBinder is a open source extension for PHP. It allows PHP programmers to easily build native Windows applications.<br />Click <a href="http://winbinder.org/overview.php" title="go to WinBinders Website">here</a> for more information.</p>
<p>I've tested with PHP 4 on W2k, only. Used WinBinder Version: 0.46.189</p>
</div>



<div class="box">
<h3>The Class supports:</h3>
<ul>
<li>automatic creation of HeaderColumns</li>
<li>it can handle indexed and associative DataArrays</li>
<li>if the DataRecords contain an Unique-Identifier-Field, the class validates new entries against it and skips all Records that fail</li>
<li>enhanced sorting for the columns:<br />
- single Columns ascending / descending<br />
- hirarchical sort of multiple Columns (max 3), ascending / descending</li>
<li>DataHandling for:<br />
- Adding new Rows: with and without preserving existing rows<br />
- Deleting Rows: all, selected, checked, unselected, unchecked<br />
- Copy Data of Rows: all, selected, checked, unselected, unchecked</li>
<li>adding a statusbar to the ListView with useful information</li>
<li>adding a Button to open a Configurator-Window, to let the user save
ColumnWidth for all columns, or define TextAlign per column, X-tended
sortvalues per column, colors for the ListView and also if the Listview
should display Lines or CheckBoxes</li>
<li>adding Display-by-Hover-Buttons for DataHandling-DELETE<br />
Buttons: selected, checked, unselected, unchecked, all</li>
<li>... and more</li>
</ul>
</div>


<div class="box">
<h3>General Thoughts</h3>
<p>Besides the need of a more comfortable Sorting with ListViews, I want to ease up the configuration of ListViews during coding time. Very unlikely to me was to define the width for columns at coding time. So I decide to delegate all this stuff to the user at execution time of the apps.</p>
</div>


<div class="box">
<h3>Screenshots &amp; Short Explanation</h3>
<p><img src="LV_screen_1.jpg" border=0 alt="" title="" style="float: right;">
This is a sample-app with two ListViews, both handled by it's own class instance. Following the numbered indicators you see the StatusBar with different informations at #1.<br />
#2 shows the little Button at the TopLeft-Position of the ListView, which only gets visible when the mouse hovers the window-area 10 pix above the ListView. This Button opens the Configurator-window to the user. (See next screenshot)<br />
The ListViews can have individual colors for text and background. Also like at #3, they may have CheckBoxes and/or Lines, or not.
<br />
When using the class-extension "<b>hnwb_ListView_Buttons</b>" instead of the base-class, you have five default-buttons like at #4. The buttons only appear when the mouse hovers the 18 pix area beneath the ListView. Also all buttons which actions don't make sence on the current ListView-situation are shown, but disabled.
<br clear="all"/></p>
<br clear="all"/>
<p><img src="LV_screen_2.jpg" border=0 alt="" title="" style="float: left;"><br />
The Configurator-Window lets the user save the ColumnWidth, selecting Colors, display or hide lines and checkboxes, also optionally define TextAligns and sorting-lists for one, some or all Columns.
</p>
<br clear="all"/>
</div>


<div class="box">
<h3>Limitations</h3>
<p>When placing a ListView on a TabPage, the MouseMoves aren't catched. Therefor the configured Buttons are always visible.</p>
<p>Additionally you have to add one more line of code when creating the Class-Control:<p>
<div class="code">
&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF9900">//&nbsp;create&nbsp;the&nbsp;Control,
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;don't&nbsp;forget&nbsp;to&nbsp;set&nbsp;the&nbsp;WBC_SORT-Flag!
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">ctrl&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">wb_create_control</font><font color="#006600">(</font><font color="#0000CC">$winmain</font><font color="#006600">,&nbsp;</font><font color="#0000CC">ListView</font><font color="#006600">,&nbsp;</font><font color="#CC0000">''</font><font color="#006600">,&nbsp;</font><font color="#0000CC">10</font><font color="#006600">,&nbsp;</font><font color="#0000CC">25</font><font color="#006600">,&nbsp;</font><font color="#0000CC">511</font><font color="#006600">,&nbsp;</font><font color="#0000CC">145</font><font color="#006600">,&nbsp;</font><font color="#0000CC">IDC_LISTVIEW_1</font><font color="#006600">,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">WBC_VISIBLE&nbsp;</font><font color="#006600">|&nbsp;</font><font color="#0000CC">WBC_ENABLED&nbsp;</font><font color="#006600">|&nbsp;</font><font color="#0000CC">WBC_SORT&nbsp;</font><font color="#006600">,&nbsp;</font><font color="#0000CC">0</font><font color="#006600">,&nbsp;</font><font color="#0000CC">2</font><font color="#006600">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF9900">//&nbsp;create&nbsp;a&nbsp;class-property&nbsp;with&nbsp;name&nbsp;'TabPage',&nbsp;and&nbsp;assign&nbsp;the&nbsp;TabPage-ID&nbsp;to&nbsp;it:
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">TabPage</font><font color="#006600">&nbsp;=&nbsp;2;</font><br />
</div>
</div>


<div class="box">
<h3>Example-Apps</h3>
<p>I have packed a ZIP with the needed class-files 'hnwb_ListView.class.php', 'hn_basic.class.php', 'hn_ini.class.php' and 4 Example-Apps. Also this html-docfile is included.</p>
<p>In the first ExampleApp, a ListView is created with disabled Configurator-Window and therefor also the automatically creation of columnheaders isn't used. All is done manually: set the Column-Header-Names, define Column-width, optionally Textalign and some hirarchically sort-lists.</p>
<p>The second ExampleApp creates the same ListView, but delegates all settings-stuff via enabled Configurator-Window to the user. It also uses the Extended-Class-Version that adds some Default-Buttons to the ListView.</p>
<p>The third ExampleApp is a bit advanced, because it creates an own Class-Extension to the hnwb_ListView_Buttons-Class. It defines four own Buttons to transfer selected or checked Records from this ListView to another one via copy or move, (wow)! The second ListView collects all Records from the first one and also allows duplicate entries. It has the default-Buttons to delete Records.</p>
<p>&nbsp;</p>
<p>You can pick the latest <a href="http://hn273.users.phpclasses.org/browse/package/3621.html">Zipfile</a> here!</p>
<p>&nbsp;</p>
<p>Happy coding!</p>
<p>&nbsp;</p>
</div>


<div class="box">
<h3>Example Code</h3>
<p>
<div class="code">
<font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;1:
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;define&nbsp;ID-Constants&nbsp;for&nbsp;your&nbsp;ListViews
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">if(!</font><font color="#0000CC">defined</font><font color="#006600">(</font><font color="#CC0000">'IDC_LISTVIEW_1'</font><font color="#006600">))&nbsp;</font><font color="#0000CC">define</font><font color="#006600">(</font><font color="#CC0000">'IDC_LISTVIEW_1'</font><font color="#006600">,&nbsp;</font><font color="#0000CC">1001</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;if(!</font><font color="#0000CC">defined</font><font color="#006600">(</font><font color="#CC0000">'IDC_LISTVIEW_2'</font><font color="#006600">))&nbsp;</font><font color="#0000CC">define</font><font color="#006600">(</font><font color="#CC0000">'IDC_LISTVIEW_2'</font><font color="#006600">,&nbsp;</font><font color="#0000CC">1002</font><font color="#006600">);
</font>
</div>


<div class="code">
<font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;2:
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;Create&nbsp;window&nbsp;with:&nbsp;WBC_NOTIFY,&nbsp;WBC_MOUSEMOVE&nbsp;|&nbsp;WBC_HEADERSEL&nbsp;!!!
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$winmain&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">wb_create_window</font><font color="#006600">(</font><font color="#0000CC">null</font><font color="#006600">,&nbsp;</font><font color="#0000CC">AppWindow</font><font color="#006600">,&nbsp;</font><font color="#0000CC">APPNAME</font><font color="#006600">,&nbsp;</font><font color="#0000CC">WBC_CENTER</font><font color="#006600">,&nbsp;</font><font color="#0000CC">WBC_CENTER</font><font color="#006600">,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">540</font><font color="#006600">,&nbsp;</font><font color="#0000CC">449</font><font color="#006600">,&nbsp;</font><font color="#0000CC">WBC_NOTIFY</font><font color="#006600">,&nbsp;</font><font color="#0000CC">WBC_MOUSEMOVE&nbsp;</font><font color="#006600">|&nbsp;</font><font color="#0000CC">WBC_HEADERSEL&nbsp;</font><font color="#006600">);
</font>
</div>


<div class="code">
<font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;3:
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;create&nbsp;a&nbsp;global&nbsp;INI-Object
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$inifile&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">str_replace</font><font color="#006600">(</font><font color="#CC0000">'.phpw'</font><font color="#006600">,</font><font color="#CC0000">''</font><font color="#006600">,&nbsp;</font><font color="#0000CC">__FILE__</font><font color="#006600">).</font><font color="#CC0000">'.ini'</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$ini&nbsp;</font><font color="#006600">=&nbsp;new&nbsp;</font><font color="#0000CC">hn_ini</font><font color="#006600">(</font><font color="#0000CC">$inifile</font><font color="#006600">,</font><font color="#0000CC">TRUE</font><font color="#006600">,</font><font color="#0000CC">TRUE</font><font color="#006600">);
</font>
</div>


<div class="code">
<font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;4:
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;get&nbsp;Data&nbsp;for&nbsp;the&nbsp;Listview&nbsp;(e.g.&nbsp;from&nbsp;MySQL-Query)
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;for&nbsp;this&nbsp;example,&nbsp;we&nbsp;use&nbsp;an&nbsp;associative&nbsp;Data-Array&nbsp;with&nbsp;unique&nbsp;IDs.
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$data&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">example_data</font><font color="#006600">();
</font>
</div>


<div class="code">
<font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;5:
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;create&nbsp;an&nbsp;Object&nbsp;for&nbsp;the&nbsp;Listview
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1&nbsp;</font><font color="#006600">=&nbsp;new&nbsp;</font><font color="#0000CC">hnwb_ListView</font><font color="#006600">(</font><font color="#0000CC">$ini</font><font color="#006600">,</font><font color="#0000CC">TRUE</font><font color="#006600">,</font><font color="#0000CC">TRUE</font><font color="#006600">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF9900">//&nbsp;create&nbsp;the&nbsp;Control,
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;don't&nbsp;forget&nbsp;to&nbsp;set&nbsp;the&nbsp;WBC_SORT-Flag!
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">ctrl&nbsp;</font><font color="#006600">=&nbsp;</font><font color="#0000CC">wb_create_control</font><font color="#006600">(</font><font color="#0000CC">$winmain</font><font color="#006600">,&nbsp;</font><font color="#0000CC">ListView</font><font color="#006600">,&nbsp;</font><font color="#CC0000">''</font><font color="#006600">,&nbsp;</font><font color="#0000CC">10</font><font color="#006600">,&nbsp;</font><font color="#0000CC">25</font><font color="#006600">,&nbsp;</font><font color="#0000CC">511</font><font color="#006600">,&nbsp;</font><font color="#0000CC">145</font><font color="#006600">,&nbsp;</font><font color="#0000CC">IDC_LISTVIEW_1</font><font color="#006600">,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">WBC_VISIBLE&nbsp;</font><font color="#006600">|&nbsp;</font><font color="#0000CC">WBC_ENABLED&nbsp;</font><font color="#006600">|&nbsp;</font><font color="#0000CC">WBC_SORT&nbsp;</font><font color="#006600">,&nbsp;</font><font color="#0000CC">0</font><font color="#006600">,&nbsp;</font><font color="#0000CC">0</font><font color="#006600">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF9900">//&nbsp;setup&nbsp;the&nbsp;ini-object,&nbsp;(ATTENTION:&nbsp;THIS&nbsp;MUST&nbsp;BE&nbsp;CALLED&nbsp;DIRECTLY&nbsp;AFTER&nbsp;THE&nbsp;CONTROL&nbsp;IS&nbsp;CREATED)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">initialize_ini</font><font color="#006600">();
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF9900">//&nbsp;use&nbsp;AutoConfigure&nbsp;for&nbsp;the&nbsp;Headernames&nbsp;and&nbsp;setup&nbsp;the&nbsp;listview&nbsp;to&nbsp;handle
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;data&nbsp;with&nbsp;Unique-ID's&nbsp;(uid-fieldname&nbsp;=&nbsp;id),&nbsp;so&nbsp;no&nbsp;duplicate&nbsp;entries&nbsp;are&nbsp;allowed&nbsp;.
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">set_ASSOC_AUTO_Column_Header</font><font color="#006600">(</font><font color="#0000CC">$data</font><font color="#006600">,&nbsp;</font><font color="#CC0000">'id'</font><font color="#006600">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF9900">//&nbsp;finally&nbsp;setup&nbsp;the&nbsp;enhanced&nbsp;Control,&nbsp;(ATTENTION:&nbsp;THIS&nbsp;MUST&nbsp;BE&nbsp;CALLED&nbsp;AFTER&nbsp;THE&nbsp;ColumnHeader&nbsp;ARE&nbsp;CREATED)
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">initialize</font><font color="#006600">();
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#FF9900">//&nbsp;pass&nbsp;Data
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">Data_PUT</font><font color="#006600">(</font><font color="#0000CC">$data</font><font color="#006600">);
</font>
</div>


<div class="code">
<br /><font color="#FF9900">// following are the needed entries in the WinBinders wb_main_loop-CallBack-function</font>
<br />
<br />
<font color="#006600">function&nbsp;</font><font color="#0000CC">process_main</font><font color="#006600">(</font><font color="#0000CC">$window</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$id</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$ctrl</font><font color="#006600">=</font><font color="#0000CC">0</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam1</font><font color="#006600">=</font><font color="#0000CC">0</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam2</font><font color="#006600">=</font><font color="#0000CC">0</font><font color="#006600">)
<br />{
<br />
<br /></font><font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;6:
<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;make&nbsp;the&nbsp;$LV_cfg&nbsp;and&nbsp;the&nbsp;ListView-ObjectHandlers&nbsp;global!
<br />&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">if(!isset(</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]))&nbsp;</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]&nbsp;=&nbsp;</font><font color="#0000CC">null</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;global&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lv2</font><font color="#006600">;
<br />
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;switch(</font><font color="#0000CC">$id</font><font color="#006600">)
<br />&nbsp;&nbsp;&nbsp;&nbsp;{
<br />
<br />
<br /></font><font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;7:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;First&nbsp;Hook&nbsp;into&nbsp;the&nbsp;MainProcess-EventHandler,
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;with&nbsp;fallthrough&nbsp;!&nbsp;(without&nbsp;break-command)
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">case&nbsp;</font><font color="#0000CC">IDDEFAULT</font><font color="#006600">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">Event_Handler</font><font color="#006600">(</font><font color="#0000CC">$window</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$id</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$ctrl</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam1</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam2</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv2</font><font color="#006600">-&gt;</font><font color="#0000CC">Event_Handler</font><font color="#006600">(</font><font color="#0000CC">$window</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$id</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$ctrl</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam1</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam2</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]);
<br />
<br />
<br />
<br /></font><font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;8:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;For&nbsp;each&nbsp;ListView-ObjectHandler:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;set&nbsp;a&nbsp;second&nbsp;Hook&nbsp;into&nbsp;the&nbsp;MainProcess-EventHandler,
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">case&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">get_ID</font><font color="#006600">():
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">Event_Handler</font><font color="#006600">(</font><font color="#0000CC">$window</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$id</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$ctrl</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam1</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam2</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case&nbsp;</font><font color="#0000CC">$lv2</font><font color="#006600">-&gt;</font><font color="#0000CC">get_ID</font><font color="#006600">():
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv2</font><font color="#006600">-&gt;</font><font color="#0000CC">Event_Handler</font><font color="#006600">(</font><font color="#0000CC">$window</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$id</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$ctrl</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam1</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$lparam2</font><font color="#006600">,&nbsp;</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
<br />
<br />
<br />
<br /></font><font color="#FF9900">#--&gt;&nbsp;STEP&nbsp;9:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;For&nbsp;each&nbsp;ListView-ObjectHandler:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;CleanUp&nbsp;at&nbsp;ProcessTermination
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#006600">case&nbsp;</font><font color="#0000CC">IDCLOSE</font><font color="#006600">:
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]&nbsp;=&nbsp;</font><font color="#0000CC">null</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset(</font><font color="#0000CC">$GLOBALS</font><font color="#006600">[</font><font color="#CC0000">'LV_cfg'</font><font color="#006600">]);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">-&gt;</font><font color="#0000CC">Destroy</font><font color="#006600">();
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv1</font><font color="#006600">=</font><font color="#0000CC">null</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset(</font><font color="#0000CC">$lv1</font><font color="#006600">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv2</font><font color="#006600">-&gt;</font><font color="#0000CC">Destroy</font><font color="#006600">();
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">$lv2</font><font color="#006600">=</font><font color="#0000CC">null</font><font color="#006600">;
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unset(</font><font color="#0000CC">$lv2</font><font color="#006600">);
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font><font color="#0000CC">wb_destroy_window</font><font color="#006600">(</font><font color="#0000CC">$window</font><font color="#006600">);
<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
<br />
<br />&nbsp;&nbsp;&nbsp;&nbsp;}
<br />
<br /></font>
</div>
</p>
</div>

</body>
</html>
<!--
$Id: index.html,v 1.2 2007/01/04 23:03:37 horst Exp $
-->
Return current item: hnwb_ListView for WinBinder