From 372c2812d998fb9fb34ba1a8cf148768450a1bbf Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 27 Mar 2002 22:09:49 +0000 Subject: [PATCH] wxX11 wants to have the border style flag in wxWindowX11. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/listbox.cpp | 9 ++++++++- src/univ/textctrl.cpp | 5 +++++ src/univ/themes/win32.cpp | 4 ++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index 65c41bc9df..725eafa5ec 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -101,7 +101,14 @@ bool wxListBox::Create(wxWindow *parent, if ( !(style & (wxLB_MULTIPLE | wxLB_EXTENDED)) ) style |= wxLB_SINGLE; - if ( !wxControl::Create(parent, id, pos, size, style | wxVSCROLL , wxDefaultValidator, name) ) +#if wxUSE_TWO_WINDOWS + style |= wxVSCROLL|wxHSCROLL; + if ((style & wxBORDER_MASK) == 0) + style |= wxBORDER_SUNKEN; +#endif + + if ( !wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) return FALSE; SetWindow(this); diff --git a/src/univ/textctrl.cpp b/src/univ/textctrl.cpp index e1cedbad12..13d8d1054c 100644 --- a/src/univ/textctrl.cpp +++ b/src/univ/textctrl.cpp @@ -691,6 +691,11 @@ bool wxTextCtrl::Create(wxWindow *parent, // 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) ) diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index ba02e22faf..7bb3909034 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -1864,8 +1864,12 @@ wxRect wxWin32Renderer::GetBorderDimensions(wxBorder border) const break; default: + { + // char *crash = NULL; + // *crash = 0; wxFAIL_MSG(_T("unknown border type")); // fall through + } case wxBORDER_DEFAULT: case wxBORDER_NONE: -- 2.45.2