Underlining text

Typed Underlining in the help, no hits. Typed underlining in the topic search...

Why is underline not in the font dialog like it should be? You know like 99.99999999% of other applications?

It's like going to the dairy section to find cottage cheese and finding out they put cottage cheese in the produce section.

Can you be a little more specific? Vision? Perspective? What component?

After running into this issue in Vision quite a lot, I found you can just put <html><u> in front of the text and it works.

Honestly should not matter where. However, i was trying to underline text in a Vision button.

Yeah, but that seems to me to be bad design. Sure, I understand the power of being able to do that, but 90% of the time we are just looking to do simple things, ya know?

Because we don't underline things in HMIs.

Well, sometimes you DO underline things in HMIs.

Boring technical details you probably don't really care about:
Vision is a very thin layer over Java Swing. For better or worse, we're locked in to that technical decision made ~15 years ago. Swing has exactly threes styles for fonts: plain, bold, and italic.

We could potentially do something to paper over this lack of underline.
Option A: We quietly do what @Mark_Minuth suggested, "under the hood". This would run the risk of interfering with anyone's project that's already manually using Swing's limited HTML support for some other purpose. Swing's HTML support also adds non-zero overhead to painting, and doing it quietly risks a performance footgun.
Option B: We intercede in the painting process of literally every Swing component to manually add underlining when drawing strings, per some component property. This would be a large effort for extremely minimal gain, in a product that is considered more or less feature complete at this point.

Technical details over.

I can empathize with your frustration when something that feels like it should be simple isn't available to you. I don't have a solution to offer you. At least we're just missing underlines, and not something more crucial.

2 Likes

Thank you for the technical answer. i appreciate it.

And both stable and performant. That's worth a great deal to me and my clients.

In general, underlining screams "designed by an amateur". Have a look around you. You won't find it in professionally designed books, magazines, TV captions, advertising, websites, etc., or on properly designed HMIs. The underline cuts through descenders on lowercase letters ( q y p g j )and makes a mess of them. Use bold and italics sparingly for best effect. The only exceptions I would allow would be hyperlinks and hot-key Alt shortcuts (File, Save, Save As ...).

I think that underline was popularised by typists and, perhaps, in school where it was a quick way to apply emphasis to hand-written text.

4 Likes