Exemple #1
0
        public TextAreaHandler()
        {
            Control = new EtoTextView
            {
                Handler  = this,
                Delegate = new EtoDelegate {
                    Handler = this
                },
                AutoresizingMask      = NSViewResizingMask.WidthSizable | NSViewResizingMask.HeightSizable,
                HorizontallyResizable = true,
                VerticallyResizable   = true,
                Editable = true,
                RichText = false,
                AllowsDocumentBackgroundColorChange = false,
                Selectable = true,
                AllowsUndo = true,
                MinSize    = CGSize.Empty,
                MaxSize    = new CGSize(float.MaxValue, float.MaxValue)
            };
            Control.TextContainer.WidthTracksTextView = true;

            Scroll = new EtoScrollView
            {
                Handler               = this,
                AutoresizesSubviews   = true,
                HasVerticalScroller   = true,
                HasHorizontalScroller = true,
                AutohidesScrollers    = true,
                BorderType            = NSBorderType.BezelBorder,
                DocumentView          = Control
            };
        }
Exemple #2
0
        public ScrollableHandler()
        {
            Enabled = true;
            Control = new EtoScrollView
            {
                Handler               = this,
                BackgroundColor       = NSColor.Control,
                BorderType            = NSBorderType.BezelBorder,
                DrawsBackground       = false,
                HasVerticalScroller   = true,
                HasHorizontalScroller = true,
                AutohidesScrollers    = true,
                DocumentView          = new FlippedView {
                    Handler = this
                }
            };

            // only draw dirty regions, instead of entire scroll area
            Control.ContentView.CopiesOnScroll = true;
        }