Implement wxGenericListCtrl::EndEditLabel.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6fb1a552b8
commit
705a1b547d
@ -59,6 +59,7 @@ All (GUI):
|
|||||||
- Fix handling of rectangular selections in wxStyledTextCtrl (roberto).
|
- Fix handling of rectangular selections in wxStyledTextCtrl (roberto).
|
||||||
- Fix characters outside of the BMP in wxStyledTextCtrl (Thomas Goyne).
|
- Fix characters outside of the BMP in wxStyledTextCtrl (Thomas Goyne).
|
||||||
- Allow access to the currently shown wxInfoBar buttons (Hanmac).
|
- Allow access to the currently shown wxInfoBar buttons (Hanmac).
|
||||||
|
- Add wxGenericListCtrl::EndEditLabel() (Tim Kosse).
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@ -120,6 +120,10 @@ public:
|
|||||||
|
|
||||||
wxTextCtrl *EditLabel(long item,
|
wxTextCtrl *EditLabel(long item,
|
||||||
wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl));
|
wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl));
|
||||||
|
|
||||||
|
// End label editing, optionally cancelling the edit
|
||||||
|
bool EndEditLabel(bool cancel);
|
||||||
|
|
||||||
wxTextCtrl* GetEditControl() const;
|
wxTextCtrl* GetEditControl() const;
|
||||||
void Edit( long item ) { EditLabel(item); }
|
void Edit( long item ) { EditLabel(item); }
|
||||||
|
|
||||||
|
@ -564,6 +564,9 @@ public:
|
|||||||
// start editing the label of the given item
|
// start editing the label of the given item
|
||||||
wxTextCtrl *EditLabel(long item,
|
wxTextCtrl *EditLabel(long item,
|
||||||
wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl));
|
wxClassInfo* textControlClass = wxCLASSINFO(wxTextCtrl));
|
||||||
|
|
||||||
|
bool EndEditLabel(bool cancel);
|
||||||
|
|
||||||
wxTextCtrl *GetEditControl() const
|
wxTextCtrl *GetEditControl() const
|
||||||
{
|
{
|
||||||
return m_textctrlWrapper ? m_textctrlWrapper->GetText() : NULL;
|
return m_textctrlWrapper ? m_textctrlWrapper->GetText() : NULL;
|
||||||
|
@ -2260,6 +2260,17 @@ wxTextCtrl *wxListMainWindow::EditLabel(long item, wxClassInfo* textControlClass
|
|||||||
return m_textctrlWrapper->GetText();
|
return m_textctrlWrapper->GetText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxListMainWindow::EndEditLabel(bool cancel)
|
||||||
|
{
|
||||||
|
if (!m_textctrlWrapper)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_textctrlWrapper->EndEdit(cancel ? wxListTextCtrlWrapper::End_Discard : wxListTextCtrlWrapper::End_Accept);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void wxListMainWindow::OnRenameTimer()
|
void wxListMainWindow::OnRenameTimer()
|
||||||
{
|
{
|
||||||
wxCHECK_RET( HasCurrent(), wxT("unexpected rename timer") );
|
wxCHECK_RET( HasCurrent(), wxT("unexpected rename timer") );
|
||||||
@ -5063,6 +5074,11 @@ wxTextCtrl *wxGenericListCtrl::EditLabel(long item,
|
|||||||
return m_mainWin->EditLabel( item, textControlClass );
|
return m_mainWin->EditLabel( item, textControlClass );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxGenericListCtrl::EndEditLabel(bool cancel)
|
||||||
|
{
|
||||||
|
return m_mainWin->EndEditLabel(cancel);
|
||||||
|
}
|
||||||
|
|
||||||
wxTextCtrl *wxGenericListCtrl::GetEditControl() const
|
wxTextCtrl *wxGenericListCtrl::GetEditControl() const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetEditControl();
|
return m_mainWin->GetEditControl();
|
||||||
|
Loading…
Reference in New Issue
Block a user