CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1

    TreeCntrl - Edit Label

    I want to change the text of treecntrl label just when user starts edit label. I am able to caprute this message, but whatever text I set is not coming to effect. Even SetItemText has no effect in OnBeginLabel..(). The new text is coming to effect only after user finishes editing. Somebody please suggest a solution for this.
    Thanks in advance.



  2. #2
    Join Date
    May 1999
    Posts
    318

    Re: TreeCntrl - Edit Label

    Just get the tree edit control and change the text when user starts editing.

    Here is a sample :


    // Get the edit control
    CEdit *edt=m_tree.GetEditControl();
    // Change the text
    if ( edt )
    edt->SetWindowText("MYTEXT");




    Hope this help



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