Page 1 of 1

ListViewSupport Demo project

Posted: 27 Jan 2024 12:13
by Harrison Pratt
** listViewSupport_Demo demonstrates use of the the glinda_LISTVIEW package.

This package supports
* automatic sizing of a listview control to fit contents and resizing of the containing dialog,
* automatic setting of column widths and right alignment of numeric and date fields,
* simple field editing,
* various return value options are possible, including returning only the changed values in an edited listview control or specific fields of a selected row

For demonstration, the directory "Data Files" under the "Exe64" directory contains several sample CSV files.
These files all have the extension "csv" but have different field separators, e.g. comma, semicolon, tab, or pipe
Also, some sample files have quoted fields and some do not.

For more information, see the HTML or MD files in the glinda_LISTVIEW package folder.

The csvReader_PKG included in listViewSupport_Demo is a convenient way to read character-separated text files.

Field separators are automatically detected by a csvSpy object.
Valid separators are ',', ';', tab and '|' characters
Quoted fields, if any, are parsed and dequoted automatically.
A valid data row can have any number of quoted fields.
Escaped and embedded quotes are NOT handled, however.
Labelled versus unlabelled file handling is controlled by the csvReader constructors.

** ListViewSupport_Demo.zip updated Feb. 27, 2024, to fix problem with text file inclusion constant noted by drspro2 below. There are no changes in the two demonstration packages.

Re: ListViewSupport Demo project

Posted: 9 Feb 2024 15:51
by drspro2
dear Harrison,

it should be loaded in VP11?


in VP10 it asks to add and delete packages

Re: ListViewSupport Demo project

Posted: 9 Feb 2024 18:30
by Harrison Pratt
There is nothing incompatible with VIp10.
It is common to have to remove/add VP support packages when you migrate between major versions and the IDE usually handles that well -- although, I have not done a backwards project migration.
Go ahead and let the IDE have what it wants.

I'll double-check the "include" directories on the project and see if that's an issue.

Re: ListViewSupport Demo project

Posted: 9 Feb 2024 18:32
by Harrison Pratt
There is an issue with the display being in an order that is the reverse of the input data.
You can fix that in lvSupport.pro at line 36.

Code: Select all

clauses     init_listviewControl() :-         lvControl:setLvType(listViewControl::lvs_report),         (inputLabels = [] and lvControl:setStyle([listViewControl::lvs_noColumnHeader]) orelse succeed),         lvControl:insertColumnList(0, mk_Columns()), %        lvControl:insertItemList(mk_Items()).         lvControl:insertItemList(list::reverse(mk_Items())). % HWP 2024-02-09

Re: ListViewSupport Demo project

Posted: 11 Feb 2024 11:46
by drspro2
it works, after delete all and Add all it will compile in VP10


only had to remove 2 string constants manually


thankyou

Re: ListViewSupport Demo project

Posted: 11 Feb 2024 13:01
by Harrison Pratt
These two constants in appSupport_PKG/msg.pro ?

Code: Select all

constants     startupMsg : string = #stringinclude(@"..\listViewSupport_Demo\appSupport_PKG\startUpMessage.txt").     hotkeyMsg : string = #stringinclude(@"..\listViewSupport_Demo\appSupport_PKG\hotKeyMessage.txt").

Re: ListViewSupport Demo project

Posted: 14 Feb 2024 7:48
by drspro2
Yes very correct

Re: ListViewSupport Demo project

Posted: 27 Feb 2024 14:37
by Harrison Pratt
The #stringinclude Issue is corrected in my edit of the original post.
Thanks go to drspro2 for pointing it out.