[BUG-5664] Tab Strip Size

When using HTML to format the Display Name property for tabs in a tab strip (for example, forcing a line break), it seems to count the html formatting towards the calculation of the tab’s width. So now I have to set some ridiculously large negative number for the text padding to shrink the width back down.

If Ignition is able to recognize the <html>, <center>, and <br> keys and not display them, it should also be able to discount them from the char total when calculating the tab width.

Well. The big complication here is that Ignition isn’t what’s recognizing the HTML tags. Rudimentary HTML support is a builtin feature of Java Swing itself: How to Use HTML in Swing Components (The Java™ Tutorials > Creating a GUI With Swing > Using Swing Components). So, the bug is that we’re trying to calculate the optimal tab width with font element width * number of characters in display name (basically), but when you use HTML, Swing decides not to render some characters in a way that’s mostly happening outside of our control.

I did file a ticket, because I can agree with the expectation here, but I can’t guarantee when or even if it will get fixed due to those complications.

Understandable. A simpler fix might be to just allow us to specify the tab’s width, rather than text padding, regardless of the string that’s being entered, and then it’s up to us to adjust accordingly.

1 Like