For our german users :
since two years i work with this DLL with
XPROFAN. Now i have created an INCLUDE
for PBWIN9.0. The (Shareware) DLL has good features
like Print, Editable Cells, Drag and Drop and
much more.

Link : http://frabbing.de

here is my include for interesting users :

PS: i have not tested all functions.

Code:
' Listview.dll Download from :
'  http://frabbing.de
' german product

DECLARE SUB Reginit LIB "Listview.DLL" _
          ALIAS "Register" (BYVAL H AS LONG)
DECLARE FUNCTION CreateListview LIB "Listview.DLL" _
          ALIAS "CreateListview" (BYVAL F AS LONG, BYVAL I AS LONG, BYVAL T AS LONG, BYVAL H AS LONG, BYVAL G AS LONG, BYVAL S AS LONG ) AS LONG
DECLARE SUB ShowListview LIB "Listview.DLL" _
          ALIAS "ShowListview" (BYVAL H AS LONG, BYVAL X AS LONG, BYVAL Y AS LONG, BYVAL B AS LONG, BYVAL H AS LONG)
DECLARE SUB IColumn LIB "Listview.DLL" _
          ALIAS "IColumn" (BYVAL H AS LONG, BYVAL T AS STRING, BYVAL B AS LONG, BYVAL F AS LONG)
DECLARE SUB SItem LIB "Listview.DLL" _
          ALIAS "SItem" (BYVAL H AS LONG, BYVAL B AS LONG, BYVAL A AS LONG)
DECLARE SUB InitMessages LIB "Listview.DLL" _
          ALIAS "InitMessages" (BYVAL H AS LONG)
DECLARE SUB EnableEdits LIB "Listview.DLL" _
          ALIAS "EnableEdits" (BYVAL H AS LONG, BYVAL Flag AS LONG)
DECLARE SUB PrintListview LIB "Listview.DLL" _
          ALIAS "PrintListview" (BYVAL H AS LONG, BYVAL w AS LONG, BYVAL i AS LONG, BYVAL s AS LONG, BYVAL l AS LONG, BYVAL o AS LONG, BYVAL r AS LONG, _
          BYVAL u AS LONG, BYVAL ps AS LONG, BYVAL pz AS LONG, BYVAL us AS STRING, BYVAL n AS LONG, BYVAL f AS LONG)
DECLARE SUB CloseMessages LIB "Listview.DLL" _
          ALIAS "CloseMessages" (BYVAL H AS LONG)
DECLARE SUB EnableDragDrop LIB "Listview.DLL" _
          ALIAS "EnableDragDrop" (BYVAL H AS LONG, BYVAL F AS LONG)
DECLARE SUB AddItemValues LIB "Listview.DLL" _
          ALIAS "AddItemValues" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL B AS LONG, BYVAL A AS LONG)
DECLARE FUNCTION AreCheckboxesPresent LIB "Listview.DLL" _
          ALIAS "AreCheckboxesPresent" (BYVAL H AS LONG) AS LONG
DECLARE FUNCTION AreIconsPresent LIB "Listview.DLL" _
          ALIAS "AreIconsPresent" (BYVAL H AS LONG) AS LONG
DECLARE SUB ASortListview LIB "Listview.DLL" _
          ALIAS "ASortListview" (BYVAL H AS LONG, BYVAL B AS LONG, BYVAL A AS LONG)
DECLARE SUB BuildListview LIB "Listview.DLL" _
          ALIAS "BuildListview" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL L AS LONG, BYVAL B AS LONG, BYVAL T AS LONG)
DECLARE SUB CheckIfMarkes LIB "Listview.DLL" _
          ALIAS "CheckIfMarked" (BYVAL H AS LONG)
DECLARE SUB ClearListview LIB "Listview.DLL" _
          ALIAS "ClearListview" (BYVAL H AS LONG)
DECLARE SUB ConvertDatas LIB "Listview.DLL" _
          ALIAS "ConvertDatas" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL F AS LONG)
DECLARE SUB CopyColumnTo LIB "Listview.DLL" _
          ALIAS "CopyColumnTo" (BYVAL H AS LONG, BYVAL Z AS LONG, BYVAL I AS LONG, BYVAL F AS LONG)
DECLARE SUB CopyLineTo LIB "Listview.DLL" _
          ALIAS "CopyLineTo" (BYVAL H AS LONG, BYVAL Z AS LONG, BYVAL I AS LONG, BYVAL F AS LONG)
DECLARE FUNCTION CreateImageList LIB "Listview.DLL" _
          ALIAS "CreateImageList" (BYVAL F AS LONG, BYVAL B AS LONG) AS LONG
DECLARE SUB CryptMem LIB "Listview.DLL" _
          ALIAS "CryptMem" (BYVAL B AS LONG, BYVAL A AS LONG, BYVAL S AS LONG, BYVAL L AS LONG)
DECLARE FUNCTION CsvToListview LIB "Listview.DLL" _
          ALIAS "CsvToListview" (BYVAL H AS LONG, BYVAL B AS LONG, BYVAL A AS LONG, BYVAL S AS LONG) AS LONG
DECLARE FUNCTION DbfToCsv LIB "Listview.DLL" _
          ALIAS "DbfToCsv" (BYVAL B AS LONG, BYVAL A AS LONG, BYVAL S AS LONG, BYVAL Z AS LONG, BYVAL F AS LONG) AS LONG
DECLARE SUB DeleteDoubleItems LIB "Listview.DLL" _
          ALIAS "DeleteDoubleItems" (BYVAL H AS LONG, BYVAL S AS LONG)
DECLARE SUB DeleteSpaceLines LIB "Listview.DLL" _
          ALIAS "DeleteSpaceLines" (BYVAL H AS LONG, BYVAL F AS LONG)
DECLARE SUB EditManual LIB "Listview.DLL" _
          ALIAS "EditManual" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL L AS LONG, BYVAL F AS LONG)
DECLARE SUB EraseListview LIB "Listview.DLL" _
          ALIAS "EraseListview" (BYVAL H AS LONG)
DECLARE FUNCTION ExamineColumn LIB "Listview.DLL" _
          ALIAS "ExamineColumn" (BYVAL H AS LONG, BYVAL S AS LONG) AS LONG
DECLARE SUB ExchangeBytes LIB "Listview.DLL" _
          ALIAS "ExchangeBytes" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL Q AS LONG, BYVAL Z AS LONG)
DECLARE SUB ExchangeSeparator LIB "Listview.DLL" _
          ALIAS "ExchangeSeparator" (BYVAL B AS LONG, BYVAL A AS LONG, BYVAL AT AS LONG, BYVAL NT AS LONG, BYVAL F AS LONG)
DECLARE FUNCTION FilelistToCsv LIB "Listview.DLL" _
          ALIAS "FilelistToCSv" (BYVAL N AS STRING, BYVAL B AS LONG, BYVAL S AS LONG, BYVAL Z AS LONG, BYVAL F AS LONG, BYVAL I AS LONG) AS LONG
DECLARE SUB ForbidScrollMessage LIB "Listview.DLL" _
          ALIAS "ForbidScrollMessage" (BYVAL F AS LONG)
DECLARE FUNCTION GetAllCheckboxStates LIB "Listview.DLL" _
          ALIAS "GetAllCheckboxStates" (BYVAL H AS LONG, BYVAL B AS STRING) AS LONG
DECLARE FUNCTION GetAllSelected LIB "Listview.DLL" _
          ALIAS "GetAllSelected" (BYVAL BT AS LONG, BYVAL BL AS LONG) AS LONG
DECLARE FUNCTION GetCheckboxState  LIB "Listview.DLL" _
          ALIAS "GetCheckboxState" (BYVAL H AS LONG, BYVAL I AS LONG) AS LONG
DECLARE FUNCTION GetChecked LIB "Listview.DLL" _
          ALIAS "GetChecked" (BYVAL BL AS LONG, BYVAL BI AS LONG, BYVAL BS AS LONG) AS LONG
DECLARE FUNCTION GetColumnName LIB "Listview.DLL" _
          ALIAS "GetColumnName" (BYVAL H AS LONG, BYVAL B AS STRING, BYVAL S AS LONG) AS LONG
DECLARE FUNCTION GetColumns LIB "Listview.DLL" _
          ALIAS "GetColumns" (BYVAL H AS LONG) AS LONG
DECLARE SUB GetColumnUpdate LIB "Listview.DLL" _
          ALIAS "GetColumnUpdate" (BYVAL H AS LONG, BYVAL B AS LONG)
DECLARE FUNCTION GetColumnWidth LIB "Listview.DLL" _
          ALIAS "GetColumnWidth" (BYVAL H AS LONG, BYVAL I AS LONG) AS LONG
DECLARE FUNCTION GetControlParas LIB "Listview.DLL" _
          ALIAS "GetControlParas" (BYVAL B AS LONG) AS LONG
DECLARE FUNCTION GetDllVersion LIB "Listview.DLL" _
          ALIAS "GetDllVersion" () AS LONG
DECLARE FUNCTION GetDragDropParas LIB "Listview.DLL" _
          ALIAS "GetDragDropParas" (BYVAL B AS LONG) AS LONG
DECLARE SUB GetEdgeFloats LIB "Listview.DLL" _
          ALIAS "GetEdgeFloats" (BYVAL B AS LONG, BYVAL A AS LONG, BYVAL L AS DOUBLE, BYVAL H AS DOUBLE)
DECLARE SUB GetEdgeIntegers LIB "Listview.DLL" _
          ALIAS "GetEdgeIntegers" (BYVAL B AS LONG, BYVAL A AS LONG, BYVAL L AS LONG, BYVAL H AS LONG)
DECLARE SUB GetFloat LIB "Listview.DLL" _
          ALIAS "GetFloat" (BYVAL B AS LONG, BYVAL A AS LONG, BYVAL F AS DOUBLE)
DECLARE FUNCTION GetIcon LIB "Listview.DLL" _
          ALIAS "GetIcon" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL Z AS LONG) AS LONG
DECLARE FUNCTION GetIndex LIB "Listview.DLL" _
          ALIAS "GetIndex" () AS LONG
DECLARE FUNCTION GetItemText LIB "Listview.DLL" _
          ALIAS "GetitemText" (BYVAL H AS LONG, BYVAL T AS STRING, BYVAL S AS LONG, BYVAL L AS LONG) AS LONG
DECLARE SUB GetItemTextEx LIB "Listview.DLL" _
          ALIAS "GetItemTextEx" (BYVAL H AS LONG, BYVAL T AS STRING, BYVAL S AS LONG, BYVAL L AS LONG, BYVAL A AS LONG)
DECLARE FUNCTION GetItemTextsAsFloat LIB "Listview.DLL" _
          ALIAS "GetItemTextsAsFloat" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL B AS LONG) AS LONG
DECLARE FUNCTION GetItemsTextsAsInteger LIB "Listview.DLL" _
          ALIAS "GetItemTextsAsInteger" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL B AS LONG) AS LONG
DECLARE FUNCTION GetLastKey LIB "Listview.DLL" _
          ALIAS "GetLastkey" (BYVAL L AS LONG, T AS LONG) AS LONG
DECLARE FUNCTION GetLines LIB "Listview.DLL" _
          ALIAS "GetLines" (BYVAL H AS LONG) AS LONG
DECLARE FUNCTION GetLineText LIB "Listview.DLL" _
          ALIAS "GetLineText" (BYVAL H AS LONG, BYVAL Z AS LONG, BYVAL BT AS LONG) AS LONG
DECLARE FUNCTION GetNeededMemory LIB "Listview.DLL" _
          ALIAS "GetNeededMemory" (BYVAL H AS LONG, BYVAL F AS LONG) AS LONG
DECLARE FUNCTION GetNullOffset LIB "Listview.DLL" _
          ALIAS "GetNullOffset" (BYVAL B AS LONG) AS LONG
DECLARE SUB GetOwnControlParas LIB "Listview.DLL" _
          ALIAS "GetOwnControlParas" (BYVAL B AS LONG, BYVAL H AS LONG, BYVAL S AS LONG, BYVAL Z AS LONG)
DECLARE FUNCTION GetRealColumnIndex LIB "Listview.DLL" _
          ALIAS "GetRealColumnIndex" (BYVAL H AS LONG, BYVAL S AS LONG) AS LONG
DECLARE FUNCTION GetSelected LIB "Listview.DLL" _
          ALIAS "GetSelected" (BYVAL BT AS LONG, BYVAL BL AS LONG) AS LONG
DECLARE FUNCTION GetSelectedDbClk LIB "Listview.DLL" _
          ALIAS "GetSelectedDbClk" (BYVAL BT AS LONG, BYVAL BL AS LONG) AS LONG
DECLARE FUNCTION GetSelectedLine LIB "Listview.DLL" _
          ALIAS "GetSelectedLine" (BYVAL H AS LONG) AS LONG
DECLARE FUNCTION GetTabOffsets LIB "Listview.DLL" _
          ALIAS "GetTabOffsets" (BYVAL BT AS LONG, BYVAL BO AS LONG) AS LONG
DECLARE FUNCTION GetVar LIB "Listview.DLL" _
          ALIAS "GetVar" (BYVAL F AS LONG) AS LONG
DECLARE FUNCTION ListviewToCsv LIB "Listview.DLL" _
          ALIAS "ListviewToCsv" (BYVAL H AS LONG, BYVAL B AS LONG, BYVAL A AS LONG, BYVAL F AS LONG) AS LONG
DECLARE FUNCTION ListviewToDbf LIB "Listview.DLL" _
          ALIAS "ListviewToDbf" (BYVAL H AS LONG, BYVAL B AS LONG, BYVAL A AS LONG, BYVAL F AS LONG) AS LONG
DECLARE FUNCTION ListviewToRaw LIB "Listview.DLL" _
          ALIAS "ListviewToRaw" (BYVAL H AS LONG, BYVAL B AS LONG) AS LONG
DECLARE FUNCTION MarkIfChecked LIB "Listview.DLL" _
          ALIAS "MarkifChecked" (BYVAL H AS LONG) AS LONG
DECLARE FUNCTION MixRGBs LIB "Listview.DLL" _
          ALIAS "MixRGBs" (BYVAL F1 AS LONG, BYVAL F2 AS LONG) AS LONG
DECLARE SUB PrintColumns LIB "Listview.DLL" _
          ALIAS "PrintColumns" (BYVAL B AS STRING)
DECLARE SUB RaiseColumns LIB "Listview.DLL" _
          ALIAS "RaiseColumnss" (BYVAL H AS LONG, BYVAL B AS STRING, BYVAL S AS LONG, BYVAL G AS LONG)
DECLARE SUB RaiseLine LIB "Listview.DLL" _
          ALIAS "RaiseLine" (BYVAL H AS LONG, BYVAL L AS LONG, BYVAL S AS LONG, BYVAL G AS LONG)
DECLARE SUB RawToListview LIB "Listview.DLL" _
          ALIAS "RawToListview" (BYVAL H AS LONG, BYVAL B AS LONG)
DECLARE FUNCTION ReadFileQuick LIB "Listview.DLL" _
          ALIAS "ReadFileQuick" (BYVAL S AS STRING, BYVAL B AS LONG, BYVAL O AS LONG, BYVAL A AS LONG) AS LONG
DECLARE FUNCTION SearchText LIB "Listview.DLL" _
          ALIAS "SearchText" (BYVAL H AS LONG, BYVAL SZ AS LONG, BYVAL EZ AS LONG, BYVAL SS AS LONG, BYVAL S AS STRING, BYVAL F AS LONG, BYVAL V AS LONG) AS LONG
DECLARE SUB SelectColumnEdits LIB "Listview.DLL" _
          ALIAS "SelectColumnEdits" (BYVAL H AS LONG, BYVAL B AS STRING)
DECLARE SUB SelectLine LIB "Listview.DLL" _
          ALIAS "SelectLine" (BYVAL H AS LONG, BYVAL Z AS LONG, BYVAL F AS LONG)
DECLARE FUNCTION SetAllCheckboxStates LIB "Listview.DLL" _
          ALIAS "SetAllCheckboxStates" (BYVAL H AS LONG, BYVAL B AS STRING) AS LONG
DECLARE SUB SetBackImage LIB "Listview.DLL" _
          ALIAS "SetBackImage" (BYVAL H AS LONG, BYVAL N AS STRING, BYVAL F AS LONG)
DECLARE SUB SetcheckboxState LIB "Listview.DLL" _
          ALIAS "SetCheckboxState" (BYVAL H AS LONG, BYVAL I AS LONG, BYVAL S AS LONG)
DECLARE SUB SetColumnAlignment LIB "Listview.DLL" _
          ALIAS "SetColumnAlignment" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL A AS LONG)
DECLARE FUNCTION SetColumnName LIB "Listview.DLL" _
          ALIAS "SetColumnName" (BYVAL H AS LONG, BYVAL B AS LONG, BYVAL S AS LONG) AS LONG
DECLARE FUNCTION SetColumnsFromMem LIB "Listview.DLL" _
          ALIAS "SetColumnsFromMem" (BYVAL H AS LONG, BYVAL B AS LONG, BYVAL O AS LONG) AS LONG
DECLARE SUB SetColumnSort LIB "Listview.DLL" _
          ALIAS "SetColumnSort" (BYVAL H AS LONG, BYVAL S AS LONG, BYVAL F AS LONG)
DECLARE SUB SetColumnsWidthLimits LIB "Listview.DLL" _
          ALIAS "SetColumnsWidthLimits" (BYVAL L AS LONG, BYVAL H AS LONG)
DECLARE SUB SetColumnUpdate LIB "Listview.DLL" _
          ALIAS "SetColumnUpdate" (BYVAL H AS LONG, BYVAL B AS LONG)
DECLARE SUB SetFilelistFilter LIB "Listview.DLL" _
          ALIAS "SetFilelistFilter" (BYVAL S AS STRING)
DECLARE SUB SetFilelistNoFilter LIB "Listview.DLL" _
          ALIAS "SetFilelistNoFilter" (BYVAL S AS STRING)
DECLARE SUB SetIconColumn LIB "Listview.DLL" _
          ALIAS "SetIconcolumn" (BYVAL S AS LONG)
DECLARE SUB SetIcon LIB "Listview.DLL" _
          ALIAS "SetIcon" (BYVAL H AS LONG, BYVAL Z AS LONG, BYVAL N AS LONG)
DECLARE SUB SetIconMode LIB "Listview.DLL" _
          ALIAS "SetIconMode" (BYVAL F AS LONG)
DECLARE SUB SetIconsFromMem LIB "Listview.DLL" _
          ALIAS "SetIconsFromMem" (BYVAL H AS LONG, BYVAL Z AS LONG, BYVAL B AS LONG, BYVAL A AS LONG)
DECLARE SUB SetIconsWith LIB "Listview.DLL" _
          ALIAS "SetIconsWith" (BYVAL H AS LONG, BYVAL Z AS LONG, BYVAL N AS LONG, BYVAL A AS LONG)
DECLARE FUNCTION SetImageList LIB "Listview.DLL" _
          ALIAS "SetImageList" (BYVAL H AS LONG, BYVAL I AS LONG) AS LONG
DECLARE SUB SetIndex LIB "Listview.DLL" _
          ALIAS "SetIndex" (BYVAL I AS LONG)
DECLARE FUNCTION SetItemText LIB "Listview.DLL" _
          ALIAS "SetItemText" (BYVAL H AS LONG, BYVAL T AS STRING, BYVAL S AS LONG, BYVAL L AS LONG) AS LONG
DECLARE SUB SetItemTextEx LIB "Listview.DLL" _
          ALIAS "SetItemTextEx" (BYVAL H AS LONG, BYVAL T AS STRING, BYVAL S AS LONG, BYVAL L AS LONG, BYVAL A AS LONG)
DECLARE FUNCTION SetLineHeight LIB "Listview.DLL" _
          ALIAS "SetLineHeight" (BYVAL H AS LONG, BYVAL Y AS LONG) AS LONG
DECLARE SUB SetLineNumbers LIB "Listview.DLL" _
          ALIAS "SetLineNumbers" (BYVAL H AS LONG, BYVAL Y AS LONG)
DECLARE SUB SetPrintAttributes LIB "Listview.DLL" _
          ALIAS "SetPrintAttributes" (BYVAL F AS LONG, BYVAL P1 AS LONG, BYVAL P2 AS LONG, BYVAL P3 AS LONG, BYVAL P4 AS LONG)
DECLARE SUB SetStyle LIB "Listview.DLL" _
          ALIAS "SetStyle" (BYVAL S AS LONG)
DECLARE SUB SortManual LIB "Listview.DLL" _
          ALIAS "SortManual" (BYVAL H AS LONG, BYVAL I AS LONG, BYVAL F AS LONG)
DECLARE SUB SwapLines LIB "Listview.DLL" _
          ALIAS "SwapLines" (BYVAL B AS LONG, BYVAL A AS LONG, BYVAL F AS LONG)
DECLARE FUNCTION WriteFileQuick LIB "Listview.DLL" _
          ALIAS "WriteFileQuick" (BYVAL S AS STRING, BYVAL B AS LONG, BYVAL O AS LONG, BYVAL A AS LONG) AS LONG
and here a working sample :
Code:
#COMPILE EXE

#INCLUDE "DDT.INC"
#INCLUDE "Listview.INC"

DECLARE FUNCTION SendMessage LIB "USER32.DLL" ALIAS "SendMessageA" (BYVAL hWnd AS DWORD, BYVAL dwMsg AS DWORD, BYVAL wParam AS DWORD, BYVAL lParam AS LONG) AS LONG

%IDOK = 1
%IDPrint = 2
%IDOpen  = 3
%IDSave  = 4
%IDNew   = 5
%IDClear = 6

%BS_DEFAULT = 1

' Global variable to receive the user name

GLOBAL gsUserName AS STRING
GLOBAL col AS STRING
GLOBAL hDlg AS LONG
GLOBAL titel AS STRING
GLOBAL LV AS LONG

CALLBACK FUNCTION OkButton()

  IF CB.MSG = %WM_COMMAND AND CB.CTLMSG = %BN_CLICKED THEN

    DIALOG END CB.HNDL, 1

    FUNCTION = 1

  END IF

END FUNCTION



CALLBACK FUNCTION PrintButton()

  IF CB.MSG = %WM_COMMAND AND CB.CTLMSG = %BN_CLICKED THEN
     titel = "Druck-Test"
     PrintListview(LV, hDlg, 0, 60, 200, 200, 200, 200, 0, 0, titel, 0, 1)
  END IF

END FUNCTION

CALLBACK FUNCTION LoadButton()
LOCAL file AS STRING
LOCAL bytes, x, mem, vhndl,er, err2 AS LONG
IF CB.MSG = %WM_COMMAND AND CB.CTLMSG = %BN_CLICKED THEN
  file = "file.csv"
  OPEN "file.csv" FOR INPUT AS #1
  x = LOF(1)
  CLOSE #1
  IF x > 0 THEN
     GLOBALMEM ALLOC x TO vhndl
     mem = vhndl
     er = ReadFileQuick(file, mem, 0, x)
     IF er <> 0 THEN
        SendMessage(LV,4105,0,0) ' Delete all items
        err2 = CsvToListview(LV, mem, x, 3)
     END IF
     GLOBALMEM FREE mem TO vhndl
  END IF
END IF
END FUNCTION

CALLBACK FUNCTION SaveButton()
LOCAL file AS STRING
LOCAL bytes, vhndl, mem, wbytes, er AS  LONG
IF CB.MSG = %WM_COMMAND AND CB.CTLMSG = %BN_CLICKED THEN
  file = "file.csv"
  bytes = GetNeededMemory(LV, 1)
  IF bytes > 0 THEN
     GLOBALMEM ALLOC bytes TO vhndl
     mem = vhndl
     wbytes = ListviewToCsv(LV, mem, 0, 1)
     er = WriteFileQuick(file, mem, 0, wbytes)
     IF er <> 0 THEN
        MSGBOX "file saved", %MB_OK, "Save File :  file.csv"
     END IF
     GLOBALMEM FREE mem TO vhndl
  END IF
END IF
END FUNCTION

CALLBACK FUNCTION NewButton()
DIM colArray(1 TO 3) AS STRING
DIM pArr1 AS STRING POINTER
IF CB.MSG = %WM_COMMAND AND CB.CTLMSG = %BN_CLICKED THEN
  colArray(1) = ""
  colArray(2) = ""
  colArray(3) = ""
  PArr1 = VARPTR(colArray(1))
  SItem(LV, PArr1, 3)
  SelectLine(LV, GetLines(LV) - 1, 1)
END IF
END FUNCTION

CALLBACK FUNCTION ClearButton()
IF CB.MSG = %WM_COMMAND AND CB.CTLMSG = %BN_CLICKED THEN
   SendMessage(LV,4105,0,0)
END IF
END FUNCTION

FUNCTION PBMAIN() AS LONG

'LOCAL hDlg AS LONG

LOCAL lResult AS LONG

DIM colArray(1 TO 3) AS STRING

DIM pArr1 AS STRING POINTER


DIALOG NEW 0, "Right Click for edit in a row", 10, 10, 600, 300, %WS_SYSMENU, 0 TO hDlg
CONTROL ADD BUTTON, hDlg, %IDOK, "END", 34, 32, 40, 14, %BS_DEFAULT OR %WS_TABSTOP CALL OkButton
CONTROL ADD BUTTON, hDlg, %IDCANCEL, "Print", 84, 32, 40, 14 CALL PrintButton
CONTROL ADD BUTTON, hDlg, %IDOPEN, "Load File", 134, 32, 60, 14 CALL LoadButton
CONTROL ADD BUTTON, hDlg, %IDSAVE, "Save File",  204, 32, 60, 14 CALL SaveButton
CONTROL ADD BUTTON, hDlg, %IDNew,  "New Item",   274, 32, 60, 14 CALL NewButton
CONTROL ADD BUTTON, hDlg, %IDClear,"Clear",      344, 32, 60, 14 CALL ClearButton

Reginit(0)
LV = CreateListview(hDlg, 0, 0, RGB(255,255,255), -1, &H31&)
col = "Nummer"
IColumn(LV, col, 70, 0)
col = "Name"
IColumn(LV, col, 150, 0)
col = "Ort"
IColumn(LV, col, 300, 0)
colArray(1) = "1"
colArray(2) = "Maier"
colArray(3) = "Köln"

PArr1 = VARPTR(colArray(1))
SItem(LV, PArr1, 3)

colArray(1) = "2"
colArray(2) = "Schmidt"
colArray(3) = "Hamburg"
PArr1 = VARPTR(colArray(1))
SItem(LV, PArr1, 3)

EnableEdits(LV, 1)
InitMessages(hDlg)

ShowListview(LV, 10, 100, 550, 150)

' ** Display the dialog

DIALOG SHOW MODAL hDlg TO lResult
IF lResult THEN

  'MSGBOX STR$(LV), &H00002000& ' = %MB_TASKMODAL

END IF
END FUNCTION