Inheritance: EtoLabelFieldCell
Beispiel #1
0
        protected override void Initialize()
        {
            collection = new CollectionHandler {
                Handler = this
            };
            var col = new NSTableColumn();

            col.ResizingMask = NSTableColumnResizing.Autoresizing;
            col.Editable     = false;
            cell             = new MacImageListItemCell();
            cell.Wraps       = false;
            col.DataCell     = cell;
            Control.AddColumn(col);

            Control.DoubleClick += HandleDoubleClick;
            Control.DataSource   = new EtoDataSource {
                Handler = this
            };
            Control.Delegate = new EtoDelegate {
                Handler = this
            };

            scroll = new EtoScrollView {
                Handler = this
            };
            scroll.AutoresizesSubviews   = true;
            scroll.DocumentView          = Control;
            scroll.HasVerticalScroller   = true;
            scroll.HasHorizontalScroller = true;
            scroll.AutohidesScrollers    = true;
            scroll.BorderType            = NSBorderType.BezelBorder;

            base.Initialize();
            HandleEvent(Eto.Forms.Control.KeyDownEvent);
        }
Beispiel #2
0
        public ListBoxHandler()
        {
            collection = new CollectionHandler {
                Handler = this
            };
            Control = new EtoListBoxTableView {
                Handler = this
            };

            var col = new NSTableColumn();

            col.ResizingMask = NSTableColumnResizing.Autoresizing;
            col.Editable     = false;
            cell             = new MacImageListItemCell();
            cell.Wraps       = false;
            col.DataCell     = cell;
            Control.AddColumn(col);

            Control.DataSource = new DataSource {
                Handler = this
            };
            Control.HeaderView   = null;
            Control.DoubleClick += HandleDoubleClick;
            Control.Delegate     = new Delegate {
                Handler = this
            };

            scroll = new EtoScrollView {
                Handler = this
            };
            scroll.AutoresizesSubviews   = true;
            scroll.DocumentView          = Control;
            scroll.HasVerticalScroller   = true;
            scroll.HasHorizontalScroller = true;
            scroll.AutohidesScrollers    = true;
            scroll.BorderType            = NSBorderType.BezelBorder;
        }