Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
0d2ea240ab
1 changed files with 17 additions and 0 deletions
  1. +17
    -0
      src/juce_appframework/gui/components/controls/juce_ListBox.cpp

+ 17
- 0
src/juce_appframework/gui/components/controls/juce_ListBox.cpp View File

@@ -314,6 +314,23 @@ public:
g.fillAll (owner.findColour (ListBox::backgroundColourId));
}
bool keyPressed (const KeyPress& key)
{
if (key.isKeyCode (KeyPress::upKey)
|| key.isKeyCode (KeyPress::downKey)
|| key.isKeyCode (KeyPress::pageUpKey)
|| key.isKeyCode (KeyPress::pageDownKey)
|| key.isKeyCode (KeyPress::homeKey)
|| key.isKeyCode (KeyPress::endKey))
{
// we want to avoid these keypresses going to the viewport, and instead allow
// them to pass up to our listbox..
return false;
}
return Viewport::keyPressed (key);
}
//==============================================================================
juce_UseDebuggingNewOperator


Loading…
Cancel
Save