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:
authorDominique Louis <savagesoftware@gmail.com>2017-06-08 14:05:23 +0300
committerDominique Louis <savagesoftware@gmail.com>2017-06-15 20:36:42 +0300
commit41dcf01d5630b1216a8a426c54b7bb27d227b3c6 (patch)
tree409e842c41ecb4bd6e58dcf24f95d76aa8532e45 /Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
parent32aa3e4b9c791c231f23cdf9fe73c7569617e89b (diff)
By setting the NSTextView Selectable property to false, tabbing amongst fields works correctly.
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs')
-rw-r--r--Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs27
1 files changed, 8 insertions, 19 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs b/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
index d53d659..a8a6b0a 100644
--- a/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
+++ b/Xamarin.PropertyEditing.Mac/Controls/BaseRectangleEditorControl.cs
@@ -11,13 +11,13 @@ namespace Xamarin.PropertyEditing.Mac
internal abstract class BaseRectangleEditorControl<T> : PropertyEditorControl
where T : struct
{
- protected NSTextView XLabel { get; set; }
+ protected UnfocusableTextView XLabel { get; set; }
protected NSTextField XEditor { get; set; }
- protected NSTextView YLabel { get; set; }
+ protected UnfocusableTextView YLabel { get; set; }
protected NSTextField YEditor { get; set; }
- protected NSTextView WidthLabel { get; set; }
+ protected UnfocusableTextView WidthLabel { get; set; }
protected NSTextField WidthEditor { get; set; }
- protected NSTextView HeightLabel { get; set; }
+ protected UnfocusableTextView HeightLabel { get; set; }
protected NSTextField HeightEditor { get; set; }
public override NSView FirstKeyView => XEditor;
@@ -30,39 +30,28 @@ namespace Xamarin.PropertyEditing.Mac
public BaseRectangleEditorControl ()
{
- XLabel = new NSTextView {
- Editable = false,
- };
+ XLabel = new UnfocusableTextView ();
XEditor = new NSTextField ();
XEditor.BackgroundColor = NSColor.Clear;
XEditor.StringValue = string.Empty;
XEditor.Activated += OnInputUpdated;
XEditor.EditingEnded += OnInputUpdated;
- YLabel = new NSTextView {
- Editable = false,
- Selectable = false,
- };
+ YLabel = new UnfocusableTextView ();
YEditor = new NSTextField ();
YEditor.BackgroundColor = NSColor.Clear;
YEditor.StringValue = string.Empty;
YEditor.Activated += OnInputUpdated;
YEditor.EditingEnded += OnInputUpdated;
- WidthLabel = new NSTextView {
- Editable = false,
- Selectable = false,
- };
+ WidthLabel = new UnfocusableTextView ();
WidthEditor = new NSTextField ();
WidthEditor.BackgroundColor = NSColor.Clear;
WidthEditor.StringValue = string.Empty;
WidthEditor.Activated += OnInputUpdated;
WidthEditor.EditingEnded += OnInputUpdated;
- HeightLabel = new NSTextView {
- Editable = false,
- Selectable = false,
- };
+ HeightLabel = new UnfocusableTextView ();
HeightEditor = new NSTextField ();
HeightEditor.BackgroundColor = NSColor.Clear;
HeightEditor.StringValue = string.Empty;