blob: 4c9d3920f5a16a150987fca53759f65d9db58800 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using System;
using AppKit;
using CoreGraphics;
namespace Xamarin.PropertyEditing.Mac
{
internal class FocusablePopUpButton : NSPopUpButton
{
public override bool CanBecomeKeyView { get { return Enabled; } }
public override bool BecomeFirstResponder ()
{
var willBecomeFirstResponder = base.BecomeFirstResponder ();
if (willBecomeFirstResponder) {
ScrollRectToVisible (Bounds);
}
return willBecomeFirstResponder;
}
}
}
|