Exemple #1
0
        private void InitializeMargins()
        {
            Ref.Send(Sci.SCI_SETMARGINTYPEN, Sci.MARGIN_FOLDING, Sci.SC_MARGIN_SYMBOL);
            Ref.Send(Sci.SCI_SETMARGINMASKN, Sci.MARGIN_FOLDING, Sci.SC_MASK_FOLDERS);
            Ref.Send(Sci.SCI_SETMARGINWIDTHN, Sci.MARGIN_FOLDING, 12);

            Ref.Send(Sci.SCI_MARKERDEFINEPIXMAP, Sci.SC_MARKNUM_FOLDERSUB, Pixmap.FromResource("Vline"));
            Ref.Send(Sci.SCI_MARKERDEFINEPIXMAP, Sci.SC_MARKNUM_FOLDERMIDTAIL, Pixmap.FromResource("Tcorner"));
            Ref.Send(Sci.SCI_MARKERDEFINEPIXMAP, Sci.SC_MARKNUM_FOLDERTAIL, Pixmap.FromResource("Corner"));
            Ref.Send(Sci.SCI_MARKERDEFINEPIXMAP, Sci.SC_MARKNUM_FOLDEREND, Pixmap.FromResource("BoxPlusConnected"));
            Ref.Send(Sci.SCI_MARKERDEFINEPIXMAP, Sci.SC_MARKNUM_FOLDEROPENMID, Pixmap.FromResource("BoxMinusConnected"));
            Ref.Send(Sci.SCI_MARKERDEFINEPIXMAP, Sci.SC_MARKNUM_FOLDER, Pixmap.FromResource("BoxPlus"));
            Ref.Send(Sci.SCI_MARKERDEFINEPIXMAP, Sci.SC_MARKNUM_FOLDEROPEN, Pixmap.FromResource("BoxMinus"));

            //Ref.Send(Sci.SCI_SETFOLDFLAGS, 16, 0); // 16      Draw text below if not expanded
            Ref.Send(Sci.SCI_SETMARGINSENSITIVEN, Sci.MARGIN_FOLDING, Sci.TRUE);
            Ref.Send(Sci.SCI_SETFOLDMARGINCOLOUR, true, Color.White.ToScintillaColor());
            //Ref.Send(Sci.SCI_SETMARGINWIDTHN, 0, 0);
        }