]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed a problem with borders being set wrong sometimes on wxMSW, XP, VC++ 7
authorJulian Smart <julian@anthemion.co.uk>
Thu, 19 Dec 2002 23:13:53 +0000 (23:13 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 19 Dec 2002 23:13:53 +0000 (23:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listbox.cpp
src/msw/spinctrl.cpp
src/msw/textctrl.cpp

index d74a1e4acb2c7ca3d2252146ca07414b1f648257..a274222a8ae8c0e070f8d7ce35b0074ad13b1d70 100644 (file)
@@ -161,6 +161,10 @@ bool wxListBox::Create(wxWindow *parent,
 
     wxASSERT_MSG( !(style & wxLB_MULTIPLE) || !(style & wxLB_EXTENDED),
                   _T("only one of listbox selection modes can be specified") );
+
+    if ( (m_windowStyle & wxBORDER_MASK) == wxBORDER_DEFAULT )
+        m_windowStyle |= wxBORDER_SUNKEN;
+
     if ( m_windowStyle & wxCLIP_SIBLINGS )
         wstyle |= WS_CLIPSIBLINGS;
 
index 6057edf8377e3c53f203333e32fd10694d15c484..d5253b263fe05f153392c3903d3fa173f7643a2a 100644 (file)
@@ -214,6 +214,10 @@ bool wxSpinCtrl::Create(wxWindow *parent,
     // know whether this is a horizontal or vertical control (we're always
     // vertical)
     style |= wxSP_VERTICAL;
+
+    if ( (style & wxBORDER_MASK) == wxBORDER_DEFAULT )
+        style |= wxBORDER_SUNKEN;
+
     SetWindowStyle(style);
 
     // calculate the sizes: the size given is the toal size for both controls
index 43618accd8d0ba933eeab2f169733ad180302e2f..cae21829e3d016ed420e73ee8f40fb625bf5e29e 100644 (file)
@@ -444,6 +444,9 @@ WXDWORD wxTextCtrl::MSWGetStyle(long style, WXDWORD *exstyle) const
 
 void wxTextCtrl::SetWindowStyleFlag(long style)
 {
+    if ( (style & wxBORDER_MASK) == wxBORDER_DEFAULT )
+        style |= wxBORDER_SUNKEN;
+
 #if wxUSE_RICHEDIT
     // we have to deal with some styles separately because they can't be
     // changed by simply calling SetWindowLong(GWL_STYLE) but can be changed