Here is the final code for the program I was working on that allows you to sort a 
listview on the column that is
clicked.  I did not take the time to comment it, sorry! ;[  I have modified the sort 
(a simple change really) so that
clicking on the column headers toggles the sort to either ascending or descending.

I also included a sample database file so that you won't have to create your own.  It 
contains 864 records so you will
be able to get a wide variety of selections.

It is important to tell you that I modified the code I sent.  It will not pull the 
information from the server like the
original program does, it just pulls it from the hard drive.  You MUST run this 
program with a -t flag (I used this for
testing purposes) or the program will not run correctly:

Example:

perl findata.pl -t


If you have any questions about my code, please feel free to ask.  If you have any 
comments or suggestions feel free to
tell me.  I have not been using the Win32::GUI module for very long so some of my code 
may be sloppy and not very robust
as it should be.  There are a few more things I am considering adding:

- an icon below the "New Search" button, sort of like an information icon ... "no data 
loaded", "searching the
database", or something along those lines

- for some reason the "Stop" button does not work when it is searching through the 
database, any ideas why?

- little up/down arrows applied to column headers (for ascending/descending) to 
signify what type of sort was applied

- I think there was something else but I have totally forgotten ... maybe it will come 
to me


Again, many thanks to everyone for their help.  I also hope this will help others who 
might have some questions about
some of the Win32::GUI objects and methods.

Jonathan
--------------------------------------------------------------
Jonathan Southwick                              [EMAIL PROTECTED]
Technical and Network Services
Allegheny College
Meadville, PA  16335                             814-332-2755



Reply via email to