Hello,
I have a very simple problem. I want to load to a multiline ultratexteditor 2 lines. My code is something like that:
ultratexteditro1.Text = @"USE [master]"+"\n";
ultratexteditr1.Text += @"CREATE DATABASE dbname"+"\n";
But when I load the form, the editor shows only 1 line regardless of my escape characters.
What am I doing wrong?
You must also set Multiline on the control to true.
Struski said: But when I load the form, the editor shows only 1 line regardless of my escape characters.
In Windows the new line escape characters are CR+LF (\r\n), not just LF. So you should use Environment.NewLine in your code:
Struski said: ultratexteditro1.Text = @"USE [master]"+ Environment.NewLine; ultratexteditr1.Text += @"CREATE DATABASE dbname"+Environment.NewLine;
ultratexteditro1.Text = @"USE [master]"+ Environment.NewLine;
ultratexteditr1.Text += @"CREATE DATABASE dbname"+Environment.NewLine;
HTH,
Emanuel