It is currently Wed Sep 08, 2010 9:27 pm




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Docker panels consume keyboard and mouse input for combobox controls 
Author Message

Joined: Thu May 06, 2010 11:47 pm
Posts: 9
Post Docker panels consume keyboard and mouse input for combobox controls

Hello,

I am working on a plug-in that uses a docker panel. Some input is being consumed when a combobox control is used by this code fragment:

Controls\DockersTabsControl.cs @ line 288
Code:
      protected override void OnKeyDown(KeyEventArgs ke)
      {
         if(this.Parent is DockersControl)
         {
            // Only absorb the key press when no focused on an input control, otherwise
            // the input controls may not receive certain keys such as delete and arrow keys
            DockersControl docker = (this.Parent as DockersControl);
            if(!docker.IsFocused)
               ke.Handled = true;
         }
      }


My proposed change is to add the combobox to the list of whitelisted controls here:
Controls\DockersControl.cs @ line 82
Code:
      public bool IsFocused
      {
         get
         {
            Control ac = FindActiveControl();
            
            // We have focus when we need the keyboard for input
            // Otherwise we don't want the focus and the docker may collapse
            return (ac is TextBox) || (ac is RichTextBox) || (ac is NumericUpDown) || (ac is ComboBox);  <---
         }
      }


Because the current code consumes certain events for comboboxes, the arrow keys and mouse wheel events are not being raised, which forces the user to drop the list down using the mouse only and also choosing a selection with the mouse only.

If possible, I would like the docker panel to be keyboard accessible and since this box is also a live preview, the ability for a user to wheel through the selections for quick previews.

Thanks!
Xabis


Sun Jun 27, 2010 2:58 am
Profile
User avatar

Joined: Sun Jan 04, 2009 4:49 pm
Posts: 543
Post Re: Docker panels consume keyboard and mouse input for combobox controls

As long as it doesn't break any other docker panels (do we already have panels with comboboxes?) then I guess this is OK.


Sun Jun 27, 2010 9:22 am
Profile
User avatar

Joined: Sun Jan 04, 2009 4:49 pm
Posts: 543
Post Re: Docker panels consume keyboard and mouse input for combobox controls

Done.


Sun Aug 01, 2010 6:28 pm
Profile
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group. Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.