]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/listbox.cpp
cleanup - more reformatting; fixed bug introduced in prior commit
[wxWidgets.git] / src / os2 / listbox.cpp
index cd7946293414a799446b9112ad98aac928896692..d5e6bc01faabc46c5965616ce55af30acfcbe02b 100644 (file)
@@ -192,11 +192,11 @@ bool wxListBox::Create(
     SetFont(*pTextFont);
 
     //
     SetFont(*pTextFont);
 
     //
-    // Set standard wxWidgets colors for Listbox items and highlighting
+    // Set OS/2 system colours for Listbox items and highlighting
     //
     wxColour                        vColour;
 
     //
     wxColour                        vColour;
 
-    vColour.Set(wxString(wxT("WHITE")));
+    vColour = wxSystemSettingsNative::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
 
     LONG                            lColor = (LONG)vColour.GetPixel();
 
 
     LONG                            lColor = (LONG)vColour.GetPixel();
 
@@ -205,7 +205,7 @@ bool wxListBox::Create(
                       ,sizeof(LONG)
                       ,(PVOID)&lColor
                      );
                       ,sizeof(LONG)
                       ,(PVOID)&lColor
                      );
-    vColour.Set(wxString(wxT("NAVY")));
+    vColour = wxSystemSettingsNative::GetColour(wxSYS_COLOUR_HIGHLIGHT);
     lColor = (LONG)vColour.GetPixel();
     ::WinSetPresParam( m_hWnd
                       ,PP_HILITEBACKGROUNDCOLOR
     lColor = (LONG)vColour.GetPixel();
     ::WinSetPresParam( m_hWnd
                       ,PP_HILITEBACKGROUNDCOLOR
@@ -213,6 +213,8 @@ bool wxListBox::Create(
                       ,(PVOID)&lColor
                      );
 
                       ,(PVOID)&lColor
                      );
 
+    SetXComp(0);
+    SetYComp(0);
     SetSize( nX
             ,nY
             ,nWidth
     SetSize( nX
             ,nY
             ,nWidth
@@ -748,7 +750,7 @@ bool wxListBox::OS2Command(
     {
         eEvtType = wxEVT_COMMAND_LISTBOX_SELECTED;
     }
     {
         eEvtType = wxEVT_COMMAND_LISTBOX_SELECTED;
     }
-    if (uParam == LN_ENTER)
+    else if (uParam == LN_ENTER)
     {
         eEvtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED;
     }
     {
         eEvtType = wxEVT_COMMAND_LISTBOX_DOUBLECLICKED;
     }