Fixed bug #778299 - wxTE_RICH2 causes SetValue to show control.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -75,6 +75,8 @@ wxMSW:
|
|||||||
- wxStatusBar no longer corrupts surrounding windows on resize.
|
- wxStatusBar no longer corrupts surrounding windows on resize.
|
||||||
- Enable wxListCtrl in report mode to be able to use images in other
|
- Enable wxListCtrl in report mode to be able to use images in other
|
||||||
columns, if ComCtl32 >= 470.
|
columns, if ComCtl32 >= 470.
|
||||||
|
- Fixed problem where using SetValue and wxTE_RICH2 would cause control to
|
||||||
|
show.
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -1261,10 +1261,14 @@ void wxTextCtrl::DoSetSelection(long from, long to, bool scrollCaret)
|
|||||||
// ES_DISABLENOSCROLL
|
// ES_DISABLENOSCROLL
|
||||||
//
|
//
|
||||||
// this is very ugly but I don't see any other way to make this work
|
// this is very ugly but I don't see any other way to make this work
|
||||||
|
long style = 0;
|
||||||
if ( GetRichVersion() > 1 )
|
if ( GetRichVersion() > 1 )
|
||||||
{
|
{
|
||||||
if ( !HasFlag(wxTE_NOHIDESEL) )
|
if ( !HasFlag(wxTE_NOHIDESEL) )
|
||||||
{
|
{
|
||||||
|
// setting ECO_NOHIDESEL also sets WS_VISIBLE and possibly
|
||||||
|
// others, remember the style so we can reset it later if needed
|
||||||
|
style = ::GetWindowLong(GetHwnd(), GWL_STYLE);
|
||||||
::SendMessage(GetHwnd(), EM_SETOPTIONS,
|
::SendMessage(GetHwnd(), EM_SETOPTIONS,
|
||||||
ECOOP_OR, ECO_NOHIDESEL);
|
ECOOP_OR, ECO_NOHIDESEL);
|
||||||
}
|
}
|
||||||
@@ -1280,6 +1284,8 @@ void wxTextCtrl::DoSetSelection(long from, long to, bool scrollCaret)
|
|||||||
{
|
{
|
||||||
::SendMessage(GetHwnd(), EM_SETOPTIONS,
|
::SendMessage(GetHwnd(), EM_SETOPTIONS,
|
||||||
ECOOP_AND, ~ECO_NOHIDESEL);
|
ECOOP_AND, ~ECO_NOHIDESEL);
|
||||||
|
if ( style != ::GetWindowLong(GetHwnd(), GWL_STYLE) )
|
||||||
|
::SetWindowLong(GetHwnd(), GWL_STYLE, style);
|
||||||
}
|
}
|
||||||
#endif // wxUSE_RICHEDIT
|
#endif // wxUSE_RICHEDIT
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user