Condividi tramite


CTreeCtrl::EditLabel

Chiamare questa funzione per avviare modifica sul posto dell'elemento specificato.

CEdit* EditLabel( 
   HTREEITEM hItem  
);

Parametri

  • hItem
    Un elemento albero da modificare.

Valore restituito

Se l'operazione riesce, un puntatore all'oggetto CEdit utilizzato per modificare il testo dell'elemento; in caso contrario NULL.

Note

La modifica viene realizzata specificando il testo dell'elemento con un controllo di modifica a riga singola che contiene il testo.

Esempio

// Make sure the focus is set to the tree control.
m_TreeCtrl.SetFocus();

// Show the edit control on the label of the selected item. 
// The tree control must have the TVS_EDITLABELS style set.
HTREEITEM hSel = m_TreeCtrl.GetSelectedItem();
CEdit* pmyEdit = m_TreeCtrl.EditLabel(hSel);
ASSERT(pmyEdit != NULL);

Requisiti

Header: afxcmn.h

Vedere anche

Riferimenti

Classe CTreeCtrl

Grafico delle gerarchie

CTreeCtrl::GetEditControl