-
February 2nd, 2005, 02:23 PM
#1
LISTVIEW, hide a column
Is there a way to hide a column in a listview. I want to store a variable in a column. The ListView would be perfict if it could hide a column.
-
February 2nd, 2005, 02:31 PM
#2
Re: LISTVIEW, hide a column
Originally Posted by ADSOFT
Is there a way to hide a column in a listview. I want to store a variable in a column. The ListView would be perfict if it could hide a column.
why don't you store the variable in a file and access it whenever you need it?
-
February 2nd, 2005, 02:36 PM
#3
Re: LISTVIEW, hide a column
Well I want to use the sorting features of ListView. I want to use the listview as a sorting mechanism that quickly returns me an index.
-
February 2nd, 2005, 02:45 PM
#4
Re: LISTVIEW, hide a column
Originally Posted by ADSOFT
Well I want to use the sorting features of ListView. I want to use the listview as a sorting mechanism that quickly returns me an index.
i don't really understand...can you be more specific?
-
February 2nd, 2005, 02:54 PM
#5
Re: LISTVIEW, hide a column
Originally Posted by ADSOFT
Well I want to use the sorting features of ListView. I want to use the listview as a sorting mechanism that quickly returns me an index.
Instead of a hidden column, could you use CListCtrl::SetItemData to store the variable? Then in your CompareFunc do your comparison based on the item data.
-
February 2nd, 2005, 02:56 PM
#6
Re: LISTVIEW, hide a column
Originally Posted by mike200
Instead of a hidden column, could you use CListCtrl::SetItemData to store the variable? Then in your CompareFunc do your comparison based on the item data.
Way to go. That is the reason the item data is there. ..
-
February 2nd, 2005, 03:55 PM
#7
Re: LISTVIEW, hide a column
Well let say I read a fixed record length file while filtering out some records. Now I would like to store the record number some where. If I place several fields of the filtered records in the listview then the end user can sort on any of the fields (i.e. a feature of listview). Upon getting the record in question from the view, I can quicly grab more inffo from that record by reading the file. In otherwords I want to use the listview as a way to store an index to the record number yet be able to sort on
-
February 2nd, 2005, 04:01 PM
#8
Re: LISTVIEW, hide a column
Originally Posted by mike200
Instead of a hidden column, could you use CListCtrl::SetItemData to store the variable? Then in your CompareFunc do your comparison based on the item data.
Thanks,
If it doesn't display the value it will do the job. Is that the case?
TIA
-
February 2nd, 2005, 04:13 PM
#9
Re: LISTVIEW, hide a column
Originally Posted by ADSOFT
Thanks,
If it doesn't display the value it will do the job. Is that the case?
TIA
Yes. It is just like storing additional info with each item. The info can be anything and it is upto you to decide what it is. Only , you just cast it to a DWORD when you set it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|