CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004
    Location
    London, England
    Posts
    563

    CListCtrl and editing the column headers

    Does anyone know how I can edit a ListCtrl's column header text? I've looked on this site but I can't seem to find anything to resemble what I'm trying to achieve.

    Regards

    John
    I don't mind that you think slowly but I do mind that you are publishing faster than you think. Wolfgang Pauli, physicist, Nobel laureate (1900-1958)

  2. #2
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094

    Re: CListCtrl and editing the column headers

    I think there is no built-in functionality for editing the header control.
    So probably you will need to create and display an edit control yourself when the user clicks on the header. I searched the articles in codeproject, but I did not find any existing code.
    But why would smne need to change the header of the list? Just curious.
    Extreme situations require extreme measures

  3. #3
    Join Date
    May 2004
    Location
    London, England
    Posts
    563

    Re: CListCtrl and editing the column headers

    Quote Originally Posted by panayotisk
    But why would smne need to change the header of the list? Just curious.
    Been asking that question myself too, but I guess its so that the user can call their column anything they wish.

    Regards

    John
    I don't mind that you think slowly but I do mind that you are publishing faster than you think. Wolfgang Pauli, physicist, Nobel laureate (1900-1958)

  4. #4
    Join Date
    Apr 2003
    Location
    Athens, Greece
    Posts
    1,094

    Re: CListCtrl and editing the column headers

    Quote Originally Posted by Vaderman
    Been asking that question myself too, but I guess its so that the user can call their column anything they wish.
    Hmmm. But normally someone would first decide on the column name and then populate it with data.
    I mean after the column data is there, someone would change the name only if there was a mistake on choosing the right column name...
    Anyway I think it should not be too difficult to implement by showing an edit control on top of the column when the user dbl clicks the column for example.
    Extreme situations require extreme measures

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