More Visual Prolog 7.3 Examples


ListView Demo

Written by Chan Bok



This example demonstrates how to manipulate the dialog with the vpiListView control.

Feel free to copy, use, and modify this example in whatever you want manner.

How to Operate This Demo

  • Open the ListView dialog with the help of the Create|Dialog menu item.
  • To sort a column, click at the top of the column.
  • Click or Double-click on a row and get a corresponding message.
  • Click and hold on a row to edit the first field.

Main Steps to Develop This Demo

  • Create an empty project.
  • Add a listview class (
  • Add a listview modal dialog (listview.dlg).
  • Use the VDE to design a dialog box with 3 controls: OK, Cancel, and a Custom Control.
  • Assign a class name "listview_class" (can be any name) to the Custom Control.
  • Create a main menu event onFileNew and link it to the dialog box.
  • Add the PFC vpiListView package to the project.
  • Add vpiListView to the "open" qualification.
  • Complete the remaining codes.

How to Build and Run This Demo

Load the project listViewDemo.prj6 into the IDE and choose Execute or build the project, and then run Exe/listViewDemo.exe.



Download the project



The example requires Visual Prolog 7.3 Commercial Edition.


If you use the Personal Edition, but need the  features supported only in the Commercial Edition, you are welcome to order the latest build of this Edition just now: Order!


Users of previous versions of Visual Prolog are welcome to upgrade to the current version of Visual Prolog  to use the latest versions of the Visual Prolog examples.


Download VIP-ALC'08

Visual Prolog Application & Language Conference (VIP-ALC 2006) April 24-26 2006

Download VIP-ALC'06 Proceedings