From 81996dc4de3dbd8d4bf71b41872accb3899d5355 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Tue, 3 Oct 2006 12:21:11 -0400 Subject: [PATCH] ENH: allow edit of file text directly --- Source/MFCDialog/PropertyList.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Source/MFCDialog/PropertyList.cpp b/Source/MFCDialog/PropertyList.cpp index 259964a3e..731e8707b 100644 --- a/Source/MFCDialog/PropertyList.cpp +++ b/Source/MFCDialog/PropertyList.cpp @@ -332,7 +332,31 @@ void CPropertyList::OnSelchange() } else + { DisplayButton(rect); + m_nLastBox = 1; + m_prevSel = m_curSel; + rect.bottom -= 3; + rect.right -= 25; + if (m_editBox) + { + m_editBox.MoveWindow(rect); + } + else + { + m_editBox.Create(ES_LEFT | ES_AUTOHSCROLL | WS_VISIBLE + | WS_CHILD | WS_BORDER, + rect,this,IDC_PROPEDITBOX); + m_editBox.SetFont(&m_SSerif8Font); + } + + lBoxSelText = pItem->m_curValue; + + m_editBox.ShowWindow(SW_SHOW); + m_editBox.SetFocus(); + //set the text in the edit box to the property's current value + m_editBox.SetWindowText(lBoxSelText); + } } void CPropertyList::DisplayButton(CRect region)