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(); } }; }
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(); } }; }
public override void Initialize() { base.Initialize(); if (ViewObject is MacComboBox) { ((MacComboBox)ViewObject).SetEntryEventSink(EventSink); } else { ViewObject = new CustomTextField(EventSink); Widget.SizeToFit(); } }
public override void Initialize() { base.Initialize(); if (ViewObject is MacComboBox) { ((MacComboBox)ViewObject).SetEntryEventSink(EventSink); } else { ViewObject = new CustomTextField(EventSink, ApplicationContext); } MultiLine = false; }
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; } }
public override void Initialize() { base.Initialize(); ViewObject = new CustomTextField(EventSink); Widget.SizeToFit(); }