Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

ListView 2nd column editing possible (LVS_EDITLABELS doesn't cut it) ?

There doesn't seem to be any system functions/styles that allow this, wich seems rahter unpractical. LVS_EDITLABELS only allows editing the 1st column.
Can someone point me in the right direction please ?

Cheers
Jos

Comments

  • anthrax11anthrax11 Member Posts: 511
    : There doesn't seem to be any system functions/styles that allow this, wich seems rahter unpractical. LVS_EDITLABELS only allows editing the 1st column.
    : Can someone point me in the right direction please ?
    :
    : Cheers
    : Jos
    :


    Unfortunately you cannot edit the other columns directly using the listview control provided by Windows. However, it would be possible to implement the following:

    1) Register a double-click onto the list by the user
    2) Find out which item was clicked
    3) Pop up a window with an edit control and OK-Cancel buttons
    4) When OK is pressed, copy the text from that edit control to the list view control using LVM_SETITEM

    This was just one solution, you could do this in any way that you think fits the context of your program.

    I hope this helps!
  • JoseDJoseD Member Posts: 14
    Hi. It's amazing that windows doesn't provide this functionaly, I was still hoping it existed but after a few hours searching I gave up.
    I think I'm just gonna create a small edit control over the item...

    Cheers
    Jos

    : : There doesn't seem to be any system functions/styles that allow this, wich seems rahter unpractical. LVS_EDITLABELS only allows editing the 1st column.
    : : Can someone point me in the right direction please ?
    : :
    : : Cheers
    : : Jos
    : :
    :
    :
    : Unfortunately you cannot edit the other columns directly using the listview control provided by Windows. However, it would be possible to implement the following:
    :
    : 1) Register a double-click onto the list by the user
    : 2) Find out which item was clicked
    : 3) Pop up a window with an edit control and OK-Cancel buttons
    : 4) When OK is pressed, copy the text from that edit control to the list view control using LVM_SETITEM
    :
    : This was just one solution, you could do this in any way that you think fits the context of your program.
    :
    : I hope this helps!
    :

Sign In or Register to comment.