private void TextBox1_TextChanged(object sender, EventArgs e) { Console.Clear(); //Console.SetBufferSize(Math.Max(CalcSize(textBox1.Text),30),Math.Max(MyFont.Height + 2,10)); //Console.SetWindowSize(Math.Max(CalcSize(textBox1.Text),30),Math.Max(MyFont.Height + 2,10)); MyFont.DrawText(textBox1.Text, 0, 0, ConsoleColor.White); }
/// <summary>Draws this label</summary> public override void DrawElement() { int LineOffset = 0; foreach (String Line in Text.Split('\n')) { Font.DrawText(Line, Parent.LeftPos + LeftPos, Parent.TopPos + TopPos + (LineOffset * Font.Height + 1), FG); LineOffset++; } }