Exemple #1
0
        public override void Initialize()
        {
            base.Initialize();
            if (ViewObject is MacComboBox)
            {
                ((MacComboBox)ViewObject).SetEntryEventSink(EventSink);
            }
            else
            {
                var view = new CustomTextField(EventSink, ApplicationContext);
                ViewObject = new CustomAlignedContainer(EventSink, ApplicationContext, (NSView)view);
                MultiLine  = false;
            }

            Frontend.MouseEntered += delegate {
                checkMouseSelection = true;
            };
            Frontend.MouseExited += delegate {
                checkMouseSelection = false;
                HandleSelectionChanged();
            };
            Frontend.MouseMoved += delegate {
                if (checkMouseSelection)
                {
                    HandleSelectionChanged();
                }
            };
        }
Exemple #2
0
        public override void Initialize()
        {
            base.Initialize();
            if (ViewObject is MacComboBox)
            {
                ((MacComboBox)ViewObject).SetEntryEventSink(EventSink);
            }
            else
            {
                var view = new CustomTextField(EventSink, ApplicationContext);
                ViewObject = new CustomAlignedContainer(EventSink, ApplicationContext, (NSView)view)
                {
                    DrawsBackground = false
                };
                Container.ExpandVertically = true;
                MultiLine = false;
            }
            Widget.StringValue = string.Empty;

            canGetFocus            = Widget.AcceptsFirstResponder();
            Frontend.MouseEntered += delegate {
                checkMouseSelection = true;
            };
            Frontend.MouseExited += delegate {
                checkMouseSelection = false;
                HandleSelectionChanged();
            };
            Frontend.MouseMoved += delegate {
                if (checkMouseSelection)
                {
                    HandleSelectionChanged();
                }
            };
        }
Exemple #3
0
 public override void Initialize()
 {
     base.Initialize();
     if (ViewObject is MacComboBox)
     {
         ((MacComboBox)ViewObject).SetEntryEventSink(EventSink);
     }
     else
     {
         ViewObject = new CustomTextField(EventSink);
         Widget.SizeToFit();
     }
 }
Exemple #4
0
 public override void Initialize()
 {
     base.Initialize();
     if (ViewObject is MacComboBox)
     {
         ((MacComboBox)ViewObject).SetEntryEventSink(EventSink);
     }
     else
     {
         ViewObject = new CustomTextField(EventSink, ApplicationContext);
     }
     MultiLine = false;
 }
Exemple #5
0
 public override void Initialize()
 {
     base.Initialize();
     if (ViewObject is MacComboBox)
     {
         ((MacComboBox)ViewObject).SetEntryEventSink(EventSink);
     }
     else
     {
         var view = new CustomTextField(EventSink, ApplicationContext);
         ViewObject = new CustomAlignedContainer(EventSink, ApplicationContext, (NSView)view);
         MultiLine  = false;
     }
 }
Exemple #6
0
 public override void Initialize()
 {
     base.Initialize();
     ViewObject = new CustomTextField(EventSink);
     Widget.SizeToFit();
 }