Exemplo n.º 1
0
        public CodeEditorControlHandler()
        {
            //te = new Controls.Mac.TextEditor();
            te                  = new NSTextView();
            te.Font             = NSFont.FromFontName("Menlo", 11.0f);
            te.Editable         = true;
            te.Selectable       = true;
            te.AutoresizingMask = NSViewResizingMask.WidthSizable;
            te.MaxSize          = new CGSize(1000, 10000000);
            //te.Formatter = new LanguageFormatter(te, new PythonDescriptor());
            sv = new NSScrollView {
                AutoresizesSubviews = true, BorderType = NSBorderType.NoBorder, HasVerticalScroller = true, HasHorizontalScroller = true, AutoresizingMask = NSViewResizingMask.WidthSizable
            };
            var cv = new NSClipView {
                AutoresizesSubviews = true
            };

            cv.DocumentView = te;
            sv.ContentView  = cv;
            this.Control    = sv;
            te.BecomeFirstResponder();
        }