TextAlignment.Left doesn't work?

Not sure if eto related problems should be reported here or somewhere else,
but it seems TextAlignment = TextAlignment.Left doesn’t really work under OSX (at least for Label type controls)
The label remains Right aligned. TextAlignment.Center works…

Márton

Hey @marton.parlagh,

Thanks for the inquiry! I assume you are adding the label onto a panel? There are global styles for labels when they get hosted in a panel which makes them right aligned. You have a few options:

  1. Use Rhino.UI.Controls.StaticAlignedLabel
  2. Add a style to your panel for labels, something like:
public class MyPanel : Panel
{
  public MyPanel()
  {
    Styles.Add<Label>("left-align", l => l.TextAlignment = TextAlignment.Left);

    // ...   
    var label = new Label { Style = "left-align" };
  }
}

Hope this helps!

2 Likes

Ooo yes, thanks!

StaticAlignedLabel does it for me!:slight_smile:
Márton

May I have another Eto related question here?

Is there an easy way to make the Eto editable controls (for example NumericStepper not immediate?)

So when I type text/numbers it doesn’t call ValueChanged immediately, but waits for an Enter or just a split second because the user is maybe still typing?

Edit:
I just have found this:
NumericUpDownWithUnitParsingUpdateMode
which could solve my problem

Márton

Hi @curtisw,

is there a way to control text alignment inside a numeric stepper too ? I have the case that under Rhino 6 (Win) my numbers in the numeric stepper are right aligned which is desired, but under Rhino 7 (Win) the same code shows the the numbers left aligned.

thanks,
c.