1. wxGCBoolRenderer looks better under MSW

2. wxGCBoolEditor too
3. only alnum keys start editing in-place
4. some memory leaks in wxGrid plugged


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-02-23 23:38:00 +00:00
parent 2f74ed2859
commit b94ae1ea10
4 changed files with 124 additions and 39 deletions

View File

@@ -65,6 +65,10 @@
#define TV_FIRST 0x1100
#endif
#ifndef TVS_CHECKBOXES
#define TVS_CHECKBOXES 0x0100
#endif
// old headers might miss these messages (comctl32.dll 4.71+ only)
#ifndef TVM_SETBKCOLOR
#define TVM_SETBKCOLOR (TV_FIRST + 29)
@@ -346,10 +350,6 @@ bool wxTreeCtrl::Create(wxWindow *parent,
!defined( __WATCOMC__ ) && \
(!defined(__VISUALC__) || (__VISUALC__ > 1010))
#ifndef TVS_CHECKBOXES
#define TVS_CHECKBOXES 0x0100
#endif
// we emulate the multiple selection tree controls by using checkboxes: set
// up the image list we need for this if we do have multiple selections
if ( m_windowStyle & wxTR_MULTIPLE )
@@ -1321,6 +1321,24 @@ void wxTreeCtrl::ScrollTo(const wxTreeItemId& item)
wxTextCtrl* wxTreeCtrl::GetEditControl() const
{
// normally, we could try to do something like this to return something
// even when the editing was started by the user and not by calling
// EditLabel() - but as nobody has asked for this so far and there might be
// problems in the code below, I leave it disabled for now (VZ)
#if 0
if ( !m_textCtrl )
{
HWND hwndText = TreeView_GetEditControl(GetHwnd());
if ( hwndText )
{
m_textCtrl = new wxTextCtrl(this, -1);
m_textCtrl->Hide();
m_textCtrl->SetHWND((WXHWND)hwndText);
}
//else: not editing label right now
}
#endif // 0
return m_textCtrl;
}
@@ -1340,6 +1358,8 @@ wxTextCtrl* wxTreeCtrl::EditLabel(const wxTreeItemId& item,
{
wxASSERT( textControlClass->IsKindOf(CLASSINFO(wxTextCtrl)) );
DeleteTextCtrl();
HWND hWnd = (HWND) TreeView_EditLabel(GetHwnd(), (HTREEITEM) (WXHTREEITEM) item);
// this is not an error - the TVN_BEGINLABELEDIT handler might have
@@ -1349,8 +1369,6 @@ wxTextCtrl* wxTreeCtrl::EditLabel(const wxTreeItemId& item,
return NULL;
}
DeleteTextCtrl();
m_textCtrl = (wxTextCtrl *)textControlClass->CreateObject();
m_textCtrl->SetHWND((WXHWND)hWnd);
m_textCtrl->SubclassWin((WXHWND)hWnd);