extras/gui/controls/CheckListBox: use OnKeyDown instead of NotifyKeyDown for internal...
authorRejean Loyer <redj@ecere.com>
Thu, 5 Nov 2015 20:51:15 +0000 (15:51 -0500)
committerJerome St-Louis <jerome@ecere.com>
Mon, 21 Dec 2015 19:26:19 +0000 (14:26 -0500)
extras/gui/controls/CheckListBox.ec

index af784c8..b6bfb27 100644 (file)
@@ -312,20 +312,16 @@ class CheckListBox : ListBox
       }
    }
 
-   bool NotifyKeyDown(CheckListBox listBox, DataRow row, Key key, unichar ch)
+   bool OnKeyHit(Key key, unichar ch)
    {
-      if(key == space)
+      if(currentRow)
       {
-         listBox.ToggleCheck(row);
-         return false;
+         if(key == space)
+         {
+            ToggleCheck(currentRow);
+            return false;
+         }
       }
-      return true;
-   }
-
-   bool OnKeyHit(Key key, unichar ch)
-   {
-      if(key == space)
-         return false;
       return ListBox::OnKeyHit(key, ch);
    }