March 28, 2024, 11:56:17 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Deleting columns

Started by JoaoAfonso, November 14, 2007, 05:37:24 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JoaoAfonso

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
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900

mrainey

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
Software For Metalworking
http://closetolerancesoftware.com

JoaoAfonso

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
JoÃÆ'ƒÂÃ,£o Afonso
Viriato
-----------------
Iberia MUD
www.iberiamud.com
iberiamud.com:5900