GetMonospaceFont() public static method

public static GetMonospaceFont ( ) : System.Drawing.Font
return System.Drawing.Font
Example #1
0
 public Scintilla()
 {
     this.BorderStyle         = System.Windows.Forms.BorderStyle.None;
     this.Font                = UIManager.GetMonospaceFont();
     this.Styles.Default.Font = this.Font;
     for (int i = 0; i < 200; i++)
     {
         this.Styles[i].Font = this.Font;
     }
     // left margin backcolor
     if (UIManager.Enabled)
     {
         this.Styles[33].BackColor    = back;
         this.Margins.FoldMarginColor = back;
     }
     this.Margins[0].Width = 39;
     this.FoldChanged     += new EventHandler <ScintillaNET.FoldChangedEventArgs>(Scintilla_FoldChanged);
     this.ContextMenuStrip = new EditContextMenuStrip(this);
 }
Example #2
0
        protected void SetFont(Control e)
        {
            if (e is Scintilla)
            {
                Scintilla sci = e as Scintilla;
                e.Font = UIManager.GetMonospaceFont();
            }
            else
            {
                e.Font = System.Drawing.SystemFonts.MessageBoxFont;
            }

            if (UIManager.Enabled)
            {
                if (e is TabPage)
                {
                    if (System.Windows.Forms.VisualStyles.VisualStyleInformation.IsEnabledByUser)
                    {
                        e.BackColor = Color.White;
                    }
                    else
                    {
                        e.BackColor = back;
                    }
                    //e.BackgroundImage = backgroundImage;
                    //e.BackgroundImageLayout = ImageLayout.Tile;
                }
                else if (e is Panel || e is SplitContainer)
                {
                    e.BackColor = Color.Transparent;// back1;
                }
            }

            if (e.Controls.Count != 0)
            {
                foreach (Control item in e.Controls)
                {
                    SetFont(item);
                }
            }
        }
Example #3
0
        protected void SetFont(Control e)
        {
            if (e is Scintilla)
            {
                e.Font = UIManager.GetMonospaceFont();
            }
            else
            {
                e.Font = this.Font;
            }

            if (e is Panel || e is SplitContainer)
            {
                e.BackColor = Color.Transparent;// back1;
            }

            if (e.Controls.Count != 0)
            {
                foreach (Control item in e.Controls)
                {
                    SetFont(item);
                }
            }
        }