|
|
|||||||
I have been trying to remove a column from a .ListView object. Adding or clearing a column is no problem, but I can not delete it. I have tried .Remove. So what is the magic? I am hoping to be able to delete a column without losing any data in the other columns or at least not the ones before it. Thanks |
||||||||
|
|
|||||||
You might want to check the KiXForms documantation at http://www.kixforms.freeuk.com/documentation.htm for permitted methods. |
||||||||
|
|
|||||||
Been there. Done that. Went through the ListView.DOC. Tried searching this site. I was hoping someone had already tried this. |
||||||||
|
|
|||||||
Deleting columns will be in the next release, but your right - the syntax will be: $ListView.Columns(n).Remove or $ListView.Columns.Remove(n) Either one works. I could release the next version tonight - not sure if Rod is around to promote to the web site though ... stay tuned. |
||||||||
|
|
|||||||
Thanks! Is there a way to add a bunch of items at once without looping through an array? I remember reading talk about it but I have not been able to. Is this in tonight's hopefull release? Current example: code:IF Open (10, $FileComputerList, 2) = 0 |
||||||||
|
|
|||||||
Yeah, that isn't in there yet mostly because I haven't figured out what the correct syntax should be ... are you meaning something like what you can do with the listbox object: $ListBox.List = 1,2,3,4,5,6 If yes, yeah - I haven't nailed down the syntax for ListView yet, maybe like $ListView.Items = 1,2,3,4,5,6 Is this what your meaning ? -Shawn [ps] Just as an FYI, one might ask themselves why there are two methods for deleting columns (or items), the first example above: $ListView.Columns.Remove(n) asks the Columns collection to delete a particular column from its collection, the second example: $ListView.Columns(n).Remove asks a particular column to remove ITSELF from the collection - subtle difference but same effect. |
||||||||
|
|
|||||||
Yes. I was not sure if was going to be from a string list or an array? How did you plan on working with multiple columns? code:Computer Ping Access |
||||||||
|
|
|||||||
You hit the nail right on the head. Thats exactly what im trying to figure out right now, multicolumn data, was thinking about something like this. If you wanted to create an internalize version of a Kixtart table, say that contained 3 rows by two columns, could do this (define and load a two dimensional table): dim $rows[2] ; Three rows (0-2) $Rows[0] = "Shawn,173 $Rows[1] = "krabourn",1462 $Rows[2] = "sealeopard",336 $ListView.Items = $Rows This would load the complete table into the ListView ... Any others thoughts/ideas/ways we can achieve this ? [ 26. October 2002, 23:54: Message edited by: Shawn ] |
||||||||
|
|
|||||||
How about a way to define the Column and Row count and then load the data straight into the ListView bypassing the extra array? |
||||||||
|
|
|||||||
You mean like this ? code:? [ 27. October 2002, 00:38: Message edited by: Shawn ] |
||||||||
|
|
|||||||
I don't have much experience with Multi-Dimensional arrays. The following is for a single dimension array. Creating all the items first seems to run faster than looping and creating them one by one. I am just not sure, yet, how I am going to read a file and add the info to a multi-dimensional array, which would be the ListView. Sometimes things have to ramble in my head for a day or two. code:IF Open (10, $FileComputerList, 2) = 0 |