if ( style & wxTE_DONTWRAP )
{
// automatically scroll the control horizontally as necessary
- msStyle |= WS_HSCROLL;
+ //
+ // NB: ES_AUTOHSCROLL is needed for richedit controls or they don't
+ // show horz scrollbar at all, even in spite of WS_HSCROLL, and as
+ // it doesn't seem to do any harm for plain edit controls, add it
+ // always
+ msStyle |= WS_HSCROLL | ES_AUTOHSCROLL;
}
if ( style & wxTE_READONLY )
{
if ( FindFocus() == this )
{
- if (Navigate(!event.ShiftDown(), event.ControlDown()))
+ int flags = 0;
+ if (!event.ShiftDown())
+ flags |= wxNavigationKeyEvent::IsForward ;
+ if (event.ControlDown())
+ flags |= wxNavigationKeyEvent::WinChange ;
+ if (Navigate(flags))
return;
}
}
wxSize wxTextCtrl::DoGetBestSize() const
{
int cx, cy;
- wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
int wText = DEFAULT_ITEM_WIDTH;