Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/Custom/FocusablePopupButton.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusablePopupButton.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusablePopupButton.cs
index 988dc2b..7cdfcfc 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusablePopupButton.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusablePopupButton.cs
@@ -8,11 +8,29 @@ namespace Xamarin.PropertyEditing.Mac
{
public override bool CanBecomeKeyView { get { return Enabled; } }
+ public ProxyRowResponder ResponderProxy { get; set; }
+
public FocusablePopUpButton ()
{
Cell.LineBreakMode = NSLineBreakMode.TruncatingMiddle;
}
+ public override void KeyDown (NSEvent theEvent)
+ {
+ switch (theEvent.KeyCode) {
+ case (int)NSKey.Tab:
+ if (ResponderProxy != null) {
+ if (theEvent.ModifierFlags.HasFlag(NSEventModifierMask.ShiftKeyMask)) {
+ ResponderProxy.PreviousResponder ();
+ } else {
+ ResponderProxy.NextResponder ();
+ }
+ }
+ return;
+ }
+ base.KeyDown (theEvent);
+ }
+
public override bool BecomeFirstResponder ()
{
var willBecomeFirstResponder = base.BecomeFirstResponder ();