IonicWind Software

Creative Basic => General Questions => Topic started by: JoaoAfonso on November 14, 2007, 05:37:24 PM

Title: Deleting columns
Post by: JoaoAfonso on November 14, 2007, 05:37:24 PM
Ahoy.

I am having some difficulties doing something: I have a program with lots of different listviews, which may have 0 or more columns depending on data entered. Doing a refresh at that window, the listviews must be all deleted and the info again written.
My problem is how to do that: using the
CONTROLCMD dialog,column,@LVDELETECOLUMN,0 based index
often doesnt delete all the columns in the table. When I then want to put new columns with different info, it will keep some columns that should be deleted.

Does this have something to do about first need to delete items in that column and just then I can type delete column? Is there any other trick, or by logic, just the lvdeletecolumn would work?

Thank you in advance
Title: Re: Deleting columns
Post by: mrainey on November 14, 2007, 07:24:23 PM
This is how I do it in Emergence.


       SendMessage WinWhatever,@LVM_DeleteAllItems,0,0,lstWhatever

        For a = 0 to 15
            SendMessage WinWhatever,@LVM_DeleteColumn,0,a,lstWhatever
        Next a
Title: Re: Deleting columns
Post by: JoaoAfonso on November 15, 2007, 02:04:02 AM
I believe I have tried many chances without success. Found out, though, a "non professional" solution but gives the results I want. Code is ugly, but result is what's needed.
Thank you