Label trimming whitespace when height > 1
See original GitHub issueThe following code will strip the leading whitespace from the label:
Label appNameView = new Label() { X = 0, Y = 0, Height = 2, Width = Dim.Fill() };
appNameView.Text = " how about this?";
Currently the WordWrap is implied based on the height of the label - not sure why…
Might be useful to be able to set a property on the Label to enable/disable WordWrap.
Discovered when updating to the latest code base:
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
vaadin - Label height increasing with white-spaces in value
Strange thing is, when a label's value contains white-spaces (space, hyphen, etc.) it increases it's height by adding empty space below the ...
Read more >Removing white space surrounding pgfplot labels
does anyone knows how to remove the white space below the x-label and left of the y-label in pgfplots? (Not the space between...
Read more >white-space - CSS: Cascading Style Sheets - MDN Web Docs
The white-space CSS property sets how white space inside an element is handled. ... nowrap, Collapse, Collapse, No wrap, Remove, Hang.
Read more >white-space
The CSS white-space property controls how text is handled on the element it is applied to. Let's say you have HTML exactly like...
Read more >Label - .NET MAUI
LineHeight property changes the line height of text that fits on a single line, and text that wraps onto multiple lines. On Android,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great. BTW, I tested (and fixed a bug regarding) using the Unicode non-breaking space char (
/u00A0
) as a way of forcing word wrap to not happen. Works great. Just do.Replace (' ', '/u00A0')
to theText
.@daltskin I believe I fixed your issue with #785.
I did it without adding an API to turn off word wrap: I just made word wrap work correctly by not stripping whitespace (and I fixed another bug that was related).
You good with this?