Beispiel #1
0
        /// <summary>
        /// Set scintilla to use the contained lexer
        /// </summary>
        public static void ActivateHighlight()
        {
            Sci.Lexer = Lexer.Container;
            Sci.SetProperty("fold", "1");

            // Configure a margin to display folding symbols
            Sci.GetMargin(2).Type      = MarginType.Symbol;
            Sci.GetMargin(2).Mask      = Sci.Marker.MaskFolders;
            Sci.GetMargin(2).Sensitive = true;
            Sci.GetMargin(2).Width     = 20;

            // Enable folding
            Sci.AutomaticFold = AutomaticFold.Show | AutomaticFold.Click | AutomaticFold.Change;

            _lineInfo.Clear();
            Sci.Colorize(0, -1);
        }