Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Newbilius opened this issue Jan 7, 2025 · 1 comment

Comments

@Newbilius
Copy link

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;
@Newbilius
Copy link
Author

Pull request with fix:
#479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant