|
-
Dec 22nd, 2006, 06:31 AM
#1
Thread Starter
Frenzied Member
Listview Problem
When I click the columnheader of a listview, maybe a listitem or a subitem, I want to to select all items on the column and maybe have a right click menu with copy options.
Can somebody guide me with this. I've done some searching but failed.
-
Dec 22nd, 2006, 06:37 AM
#2
Re: Listview Problem
Put a PopupMenu on the ListView1_MouseDown event.
Keith
I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
-
Dec 22nd, 2006, 06:46 AM
#3
Thread Starter
Frenzied Member
Re: Listview Problem
Yes, but how can I select all the entries on the columns just by clicking it's column headers? Is this possible?
-
Dec 22nd, 2006, 07:41 AM
#4
Thread Starter
Frenzied Member
Re: Listview Problem
Ok now I had additional problems. How can I copy the contents of a listview submenu? And another question, is it possible to highlight the submenu? coz it only highlights the listitem.
Wow I realized that im so noob with listview.
Any ideas? or maybe I should change to FlexGrid instead?
-
Dec 22nd, 2006, 03:25 PM
#5
Re: Listview Problem
What are you calling submenu? Are you talking about each item in the columns? That is ListView1.SelectedItem.SubItems(1) 1 is the number of columns.
 Originally Posted by zynder
coz it only highlights the listitem
It depends which ListView you are using. Comctl32.ocx when you select an item in the first column, only that item will be highlighted. Msomctl.ocx when you select an item in the first column all columns will be highlighted in the same row.
Keith
I've been programming with VB for 25 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.
-
Dec 23rd, 2006, 08:31 PM
#6
Thread Starter
Frenzied Member
Re: Listview Problem
Sorry I mean SubItem not submenu. Is there any way I can only select the column I wanted?
Say I clicked the column headers of a subitem. Is it possible to highlight all entries of the selected column?
-
Dec 23rd, 2006, 08:34 PM
#7
Re: Listview Problem
Depends... normaly, no. ListView allows selecting only first column. But... you can sub-class it. Search the forums. You'll find many examples.
-
Dec 23rd, 2006, 08:56 PM
#8
Thread Starter
Frenzied Member
Re: Listview Problem
I can't find samples. Well, im no good at subclassing either.. Thanks for the reply gavio. I will switch to datagrid for now.
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
|