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

Text not aligning properly with DrawText #1921

Closed
axx0 opened this issue Apr 6, 2021 · 1 comment · Fixed by #2047
Closed

Text not aligning properly with DrawText #1921

axx0 opened this issue Apr 6, 2021 · 1 comment · Fixed by #2047
Labels
Milestone

Comments

@axx0
Copy link

axx0 commented Apr 6, 2021

Hi, I'm using DrawText to draw text on a Drawable panel.
Example:

g.DrawText(new Font("Arial", 9, FontStyle.Bold), new SolidBrush(Color.FromArgb(87, 171, 39)), new RectangleF(0, 0, 200, 100), "Food", FormattedTextWrapMode.None, FormattedTextAlignment.Right, FormattedTextTrimming.None);

Expected Behavior

The text on the rectangle should be right aligned.

Actual Behavior

The text is left aligned.

This also happens with Center alignment.

My system:

  • Version: EtoForms 2.5.10
  • Platform(s): WinForms
  • Operating System(s): Windows 10
@cwensley cwensley added the bug label Apr 6, 2021
@cwensley cwensley added this to the 2.5.x milestone Apr 6, 2021
@cwensley
Copy link
Member

cwensley commented Apr 6, 2021

Thanks for reporting the issue! Alignment appears to work with multi-lines, but not a single line.. Works fine with WPF and other platforms.

cwensley added a commit to cwensley/Eto that referenced this issue Oct 23, 2021
@cwensley cwensley modified the milestones: 2.6.x, 2.6.0 Oct 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants