Editing fields in columned listview

HotBBQ
02-26-2003, 07:46 PM
I have a listview object with a few columns in it. I would like to be able to click on a specific field and edit the text. Is there a relatively easy way to do this?

Garrett Sever
02-26-2003, 08:33 PM
I guess that really depends on how good you want it to look.

I made my listview ownerdrawn, I'm using API edit controls to do the Subitem edits, and API-created listboxes for the dropdowns... and its looking pretty sharp... but its certainly not easy.

Any way you look at it, it'll involve subclassing and a bunch of API. Hope you're ready.

HotBBQ
02-26-2003, 11:01 PM
You are right, it does look sharp. Unfortunately, this is for an in class assignment, and I don't quite have the time or the skill (We haven't gotten to API's and subclassing yet.). I did read somewhere that you could at least select an entire row without too much work. How would I go about removing an entire row?

Thanks for the info!

Garrett Sever
02-27-2003, 07:10 AM
well, to select a whole row, you'll need to set the "fullrowselect" property to "True".

To delete that item, its:


Listview1.ListItems.Remove Listview1.SelectedItem.Index


The key is "ListItems.Remove".

piggybank1974
02-28-2003, 06:47 PM
hi Garrett Sever

I like the Listview control, I like your version I can only imagine how long it took you to do.

Seeing as i'm at college(almost finished may time) I cannot understand for the life of me why the lecturers use the flexgrid control. I hate it.

the quality of the control is crap to say the least.

The Listview is far better and i think is easier to use.

Don't quote me on this but i think the desktop is a Listview control is it not??

the pig.

Garrett Sever
02-28-2003, 10:31 PM
The flexgrid deserves to burn in the the pits of hell for all eternity (sorry Flyguy ;) )

LONG LIVE THE LISTVIEW!!! ESP. AN OWNERDRAWN LISTVIEW!!! :D

Mwaaa haaa haaa haa haaa haaaaaaaaaaaaaaaaaaaaaa :p

Flyguy
03-01-2003, 02:34 AM
Nothing can beat the (vs)FlexGrid control :P

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum