// Created: 15.09.00
// RCS-ID: $Id$
// Copyright: (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
-// Licence: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
/*
EVT_CHAR(wxTextCtrl::OnChar)
EVT_SIZE(wxTextCtrl::OnSize)
-
- EVT_IDLE(wxTextCtrl::OnIdle)
END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxTextCtrl, wxControl)
style |= wxALWAYS_SHOW_SB;
}
+ // wxTE_WORDWRAP is 0 for now so we don't need the code below
+#if 0
if ( style & wxTE_WORDWRAP )
{
// wrapping words means wrapping, hence no horz scrollbar
style &= ~wxHSCROLL;
}
+#endif // 0
// TODO: support wxTE_NO_VSCROLL (?)
// create data object for single line controls
m_data.sdata = new wxTextSingleLineData;
}
+
+#if wxUSE_TWO_WINDOWS
+ if ((style & wxBORDER_MASK) == 0)
+ style |= wxBORDER_SUNKEN;
+#endif
if ( !wxControl::Create(parent, id, pos, size, style,
validator, name) )
MData().m_updateScrollbarY = FALSE;
}
-void wxTextCtrl::OnIdle(wxIdleEvent& event)
+void wxTextCtrl::OnInternalIdle()
{
// notice that single line text control never has scrollbars
if ( !IsSingleLine() &&
{
UpdateScrollbars();
}
-
- event.Skip();
}
bool wxTextCtrl::SendAutoScrollEvents(wxScrollWinEvent& event) const
// the update region is in window coords and text area is in the client
// ones, so it must be shifted before computing intersection
wxRegion rgnUpdate = GetUpdateRegion();
+
wxRect rectTextArea = GetRealTextArea();
wxPoint pt = GetClientAreaOrigin();
wxRect rectTextAreaAdjusted = rectTextArea;