]> git.saurik.com Git - wxWidgets.git/commitdiff
wxX11 wants to have the border style flag
authorRobert Roebling <robert@roebling.de>
Wed, 27 Mar 2002 22:09:49 +0000 (22:09 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 27 Mar 2002 22:09:49 +0000 (22:09 +0000)
    in wxWindowX11.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/listbox.cpp
src/univ/textctrl.cpp
src/univ/themes/win32.cpp

index 65c41bc9dfad0b3eec2e8d964b0b964efee5a13e..725eafa5ec721fcc211e06ef094060a8589f41a0 100644 (file)
@@ -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);
index e1cedbad1289db234de92cd2f1980d2823e106a0..13d8d1054c036bb4b576b07d922ff6663b4a69a5 100644 (file)
@@ -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) )
index ba02e22faf2846cab43a1609ecbecfe3d477aa79..7bb3909034e9a51ea55aa0174f307bafd8091b90 100644 (file)
@@ -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: