diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/button.hxx | 2 | ||||
-rw-r--r-- | vcl/source/control/button.cxx | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/vcl/inc/vcl/button.hxx b/vcl/inc/vcl/button.hxx index 05f21192e4c8..e9e515681fe9 100644 --- a/vcl/inc/vcl/button.hxx +++ b/vcl/inc/vcl/button.hxx @@ -545,6 +545,8 @@ protected: public: DisclosureButton( Window* pParent, WinBits nStyle = 0 ); DisclosureButton( Window* pParent, const ResId& rResId ); + + virtual void KeyInput( const KeyEvent& rKEvt ); }; #endif // _SV_BUTTON_HXX diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 71af9b3142c9..08992c903040 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -4457,3 +4457,22 @@ void DisclosureButton::ImplDrawCheckBoxState() DrawImage( aOff, *pImg, nStyle ); } } + +// ----------------------------------------------------------------------- + +void DisclosureButton::KeyInput( const KeyEvent& rKEvt ) +{ + KeyCode aKeyCode = rKEvt.GetKeyCode(); + + if( !aKeyCode.GetModifier() && + ( ( aKeyCode.GetCode() == KEY_ADD ) || + ( aKeyCode.GetCode() == KEY_SUBTRACT ) ) + ) + { + Check( aKeyCode.GetCode() == KEY_ADD ); + } + else + Button::KeyInput( rKEvt ); +} + + |