Hi everyone,
I was trying to wrapping the texts in the label, but it seems its not working on TableLayout or I am missing something, I tried some possible combinations btw… How can I achieve wrapping the text with new line at below when I reduce the width of panel? @curtisw
Sample code on the images;
wrapTestLabel = new Label()
{
Text = "I am one of the fan of Eto.Forms,\nI want to wrap texts in the label but they are not wrapping I dont know why....",
Width = 300, // or something narrower
Wrap = WrapMode.Word,
TextAlignment = TextAlignment.Center,
};
var wrapTestLayout = new TableLayout()
{
Padding = new Padding(5, 10, 5, 5),
Spacing = new Size(5, 5),
Rows =
{
new TableRow(null, wrapTestLabel, null),
}
};
TableLayout layout = new TableLayout()
{
// Padding around the table
Padding = new Padding(5, 10, 5, 5),
// Spacing between table cells
Spacing = new Size(5, 5),
Rows =
{
// some other layouts
new TableRow(),
// some other layouts
new TableRow(new TableCell(wrapTestLayout , false)),
// some other layouts
new TableRow(),
}
};
Content = layout;
Thanks in advance,
Merry christmas everyone!
-Oğuzhan