disabled text control doesn't show the caret
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8619 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -184,25 +184,6 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::SetFont(const wxFont& font)
|
||||
{
|
||||
if ( !wxControl::SetFont(font) )
|
||||
return FALSE;
|
||||
|
||||
// recreate it, in fact
|
||||
CreateCaret();
|
||||
|
||||
// and refresh everything, of course
|
||||
InitInsertionPoint();
|
||||
ClearSelection();
|
||||
|
||||
m_widthMax = -1;
|
||||
|
||||
Refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// set/get the value
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -2280,6 +2261,33 @@ void wxTextCtrl::DoDraw(wxControlRenderer *renderer)
|
||||
// caret
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool wxTextCtrl::SetFont(const wxFont& font)
|
||||
{
|
||||
if ( !wxControl::SetFont(font) )
|
||||
return FALSE;
|
||||
|
||||
// recreate it, in fact
|
||||
CreateCaret();
|
||||
|
||||
// and refresh everything, of course
|
||||
InitInsertionPoint();
|
||||
ClearSelection();
|
||||
|
||||
m_widthMax = -1;
|
||||
|
||||
Refresh();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::Enable(bool enable)
|
||||
{
|
||||
if ( !wxTextCtrlBase::Enable(enable) )
|
||||
return FALSE;
|
||||
|
||||
ShowCaret(enable);
|
||||
}
|
||||
|
||||
void wxTextCtrl::CreateCaret()
|
||||
{
|
||||
// FIXME use renderer
|
||||
|
Reference in New Issue
Block a user