diff options
author | Philipp Lohmann <Philipp.Lohmann@Sun.COM> | 2009-10-29 14:22:34 +0100 |
---|---|---|
committer | Philipp Lohmann <Philipp.Lohmann@Sun.COM> | 2009-10-29 14:22:34 +0100 |
commit | 19b01b2cbe8df5c53a65b967c5da9e1eb1ff86ae (patch) | |
tree | dbec49aa29eba76c9be1b9676f708bd37b2c1420 /vcl | |
parent | 80ccdb417dd3eeb6f70d8c39eb6448185adec94c (diff) |
#i106400# DisclosureButton should react on +/- keys
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 ); +} + + |