Editing item programmatically

Normally an edit is initiated when a user clicks on an item that already has the focus. Suppose, you want to start the edit when the user clicks a button, here is the code to start the edit.
You should remember to SetFocus() if the listview control does not already have the focus. Of course, for this to work, the listview control should have the LVM_EDITLABEL style.


  • Edit not initialized or empty rows

    Posted by Legacy on 07/08/1999 12:00am

    Originally posted by: Nicola Genchi

    Hello!I found very interesting and useful the articles about this matter. But the code I have been downloading doesn't let me edit the subitems of the rows not initialized. If one of the subitems has already value it works otherwise I don't have the possibility to enter value in the subitems! I would be grteaful of any help!!

    Thanks Nicola

  • selected item

    Posted by Legacy on 05/21/1999 12:00am

    Originally posted by: Liping Gao

    How do you let program know you selected item of list? I can not find any clue from all of your articls here? But this is critical. Without knowing selected item you can do nothing?


  • how do I finish editing when press ENTER?

    Posted by Legacy on 05/14/1999 12:00am

    Originally posted by: xyjiang

    In the code above, we can in_place edit the label
    of a listview control. But the editing only finish
    when you click your mouse. How can it finish when
    I press ENTER down?


Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • The open source cloud computing project OpenStack has come a long way since NASA and Rackspace launched it in 2010. Backed by leading technology infrastructure providers including Cisco, Dell, EMC, HP, IBM, Intel, and VMware, OpenStack underpins significant workloads at an increasingly diverse set of organizations, including BWM, CERN, Comcast, eBay, and Wal-Mart. For CIOs engaged in broader programs to win, serve, and retain customers -- and refocus business technology (BT) spend -- a planned and pragmatic …

  • Today there's no such thing as "one size fits all" when it comes to enterprise mobile computing for field services workers. While the business benefits of automation are clear (e.g. decreased downtime, increased customer satisfaction), selecting the right mobile device mix for the job is becoming more complex. This whitepaper examines 3 challenges organizations face when considering a mobile device deployment for field teams: Integrating new mobile devices with legacy technology Adapting to multi-generational …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date