CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    May 1999
    Posts
    1

    How to create editable ListBox?

    How to create a editable ListBox?


  2. #2
    Join Date
    May 1999
    Location
    WA
    Posts
    65

    Re: How to create editable ListBox?

    What exactly do you mean by "editable"? That will help us help you much more effectively.

    - Troy

  3. #3
    Guest

    Re: How to create editable ListBox?

    Hi,

    I think you mean you want to edit individual lines...yes

    Now, I don't know how to do this directly ...but I would like to, so please let me know if you find out...mail [email protected].........however, I know a way to get around it,

    create an edit box, when you click an item in your list, send the text to the edit control, make ammendments, and let the return key send it back to the list. As if by magic the list changed.


  4. #4
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: How to create editable ListBox?

    How about using a CListCtrl insead? It is fairly easy to add a handler for when an item is clicked or double-clicked, the same as a normal list box.



    --
    Jason Teagle
    [email protected]

  5. #5
    Guest

    Re: How to create editable ListBox?

    Hi Stewart here, I, ve used some list controls but, unlike yourself, I don't see how I make the line edit. My handlers for click etc select the line thats all. Why?


  6. #6
    Join Date
    May 1999
    Location
    Farnborough, Hants, England
    Posts
    710

    Re: How to create editable ListBox?

    Sorry, I wasn't implying that you SHOULD know how to make them editable; I have not used this feature on them myself yet - but I know it can be done.

    You need to add LVS_EDITLABELS to the style when the control is created, and then add a handler for the '=LVN_ENDLABELEDIT' message from your list view (if you are using one - if not, then the LVN_ENDLABELEDIT for the list control itself). This notifies you when the user has finished or cancelled the edit. The help will provide more details of LVN_ENDLABELEDIT, but I'd be happy to help more if you want.

    --
    Jason Teagle
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured