mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
This commit is contained in:
parent
4cc0900375
commit
0d2ea240ab
1 changed files with 17 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue