Skip to content

Commit

Permalink
Win: Use wxTE_NOHIDESEL for translation controls
Browse files Browse the repository at this point in the history
Fixes drawing problems when setting selection programatically.

Fixes invisible highlighting of search results from Find.

Fixes #334.

Alternative fix for this, if it ends up causing problems, would be to:

1. override SelectAll() in AnyTranslatableTextCtrl to use
   wxWindowUpdateLocker before calling base class' implementation
   (bypasses the redrawing-problematic code in wxMSW).

2. Use syntax highlighting (e.g. yellow background) for find results
   instead of using selection (solves the problem of selection not being
   shown if Find window has focus).
  • Loading branch information
vslavik committed Apr 9, 2017
1 parent c27f2c1 commit eb45372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/text_control.h
Expand Up @@ -46,7 +46,7 @@
class CustomizedTextCtrl : public wxTextCtrl
{
public:
static const int ALWAYS_USED_STYLE = wxTE_MULTILINE | wxTE_RICH2;
static const int ALWAYS_USED_STYLE = wxTE_MULTILINE | wxTE_RICH2 | wxTE_NOHIDESEL;

CustomizedTextCtrl(wxWindow *parent, wxWindowID winid, long style = 0);

Expand Down

0 comments on commit eb45372

Please sign in to comment.