Always use wxHSCROLL|wxVSCROLL.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
|
||||||
style |= wxVSCROLL | wxHSCROLL;
|
style |= wxVSCROLL | wxHSCROLL;
|
||||||
#endif
|
|
||||||
if (!wxControl::Create(parent, id, pos, size,
|
if (!wxControl::Create(parent, id, pos, size,
|
||||||
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
||||||
wxDefaultValidator, name))
|
wxDefaultValidator, name))
|
||||||
@@ -3118,6 +3116,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
|||||||
#endif
|
#endif
|
||||||
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
// apparently if we don't do this, Unicode keys pressed after non-char
|
||||||
|
// ASCII ones (e.g. Enter, Tab) are not taken into account (patch 1615989)
|
||||||
|
if (m_lastKeyDownConsumed && evt.GetUnicodeKey() > 255)
|
||||||
|
m_lastKeyDownConsumed = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!m_lastKeyDownConsumed && !skip) {
|
if (!m_lastKeyDownConsumed && !skip) {
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
int key = evt.GetUnicodeKey();
|
int key = evt.GetUnicodeKey();
|
||||||
|
@@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
|
||||||
style |= wxVSCROLL | wxHSCROLL;
|
style |= wxVSCROLL | wxHSCROLL;
|
||||||
#endif
|
|
||||||
if (!wxControl::Create(parent, id, pos, size,
|
if (!wxControl::Create(parent, id, pos, size,
|
||||||
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
||||||
wxDefaultValidator, name))
|
wxDefaultValidator, name))
|
||||||
|
@@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
|
||||||
style |= wxVSCROLL | wxHSCROLL;
|
style |= wxVSCROLL | wxHSCROLL;
|
||||||
#endif
|
|
||||||
if (!wxControl::Create(parent, id, pos, size,
|
if (!wxControl::Create(parent, id, pos, size,
|
||||||
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
||||||
wxDefaultValidator, name))
|
wxDefaultValidator, name))
|
||||||
@@ -3118,6 +3116,13 @@ void wxStyledTextCtrl::OnChar(wxKeyEvent& evt) {
|
|||||||
#endif
|
#endif
|
||||||
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
bool skip = ((ctrl || alt) && ! (ctrl && alt));
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
// apparently if we don't do this, Unicode keys pressed after non-char
|
||||||
|
// ASCII ones (e.g. Enter, Tab) are not taken into account (patch 1615989)
|
||||||
|
if (m_lastKeyDownConsumed && evt.GetUnicodeKey() > 255)
|
||||||
|
m_lastKeyDownConsumed = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!m_lastKeyDownConsumed && !skip) {
|
if (!m_lastKeyDownConsumed && !skip) {
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
int key = evt.GetUnicodeKey();
|
int key = evt.GetUnicodeKey();
|
||||||
|
@@ -158,9 +158,7 @@ bool wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
#ifdef __WXMAC__
|
|
||||||
style |= wxVSCROLL | wxHSCROLL;
|
style |= wxVSCROLL | wxHSCROLL;
|
||||||
#endif
|
|
||||||
if (!wxControl::Create(parent, id, pos, size,
|
if (!wxControl::Create(parent, id, pos, size,
|
||||||
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
style | wxWANTS_CHARS | wxCLIP_CHILDREN,
|
||||||
wxDefaultValidator, name))
|
wxDefaultValidator, name))
|
||||||
|
Reference in New Issue
Block a user