Skip to content

[Bug?] Ellipsis in label not work, if we put VerticalStackPanel inside grid? #477

@Newbilius

Description

@Newbilius

I expect to get something like this:
expect

What I get:
get

And if we add "Wrap=true" to left label:
get2

Maybe I do something wrong?

Full code:

MyraEnvironment.Game = this;

var grid = new Grid();
grid.ColumnsProportions.Add(new Proportion(ProportionType.Pixels,200));
grid.ColumnsProportions.Add(new Proportion(ProportionType.Fill));
grid.RowsProportions.Add(new Proportion(ProportionType.Fill));

//
var vertical1 = new VerticalStackPanel();
var labelLeft = new Label
{
    Text = "Very-very long text in the left column with broken ellipsis method",
    AutoEllipsisMethod = AutoEllipsisMethod.Character,
    Wrap = true,
    HorizontalAlignment = HorizontalAlignment.Left
};
vertical1.Widgets.Add(labelLeft);
grid.Widgets.Add(vertical1);
Grid.SetColumn(vertical1, 0);
Grid.SetRow(vertical1, 0);

//
var labelRight = new Label
{
    Text = "RIGHT TEXT",
    AutoEllipsisMethod = AutoEllipsisMethod.Character
};
grid.Widgets.Add(labelRight);
Grid.SetColumn(labelRight, 1);
Grid.SetRow(labelRight, 0);

//
desktop = new Desktop();
desktop.Root = grid;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions