From: Robert Roebling Date: Wed, 27 Mar 2002 22:09:49 +0000 (+0000) Subject: wxX11 wants to have the border style flag X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/372c2812d998fb9fb34ba1a8cf148768450a1bbf?ds=inline 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 --- 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: