Vision - HTML tag causing multi-line text 'movement'

I'm using <html><center> on several components in my Vision project to let text center and wrap where they would otherwise run off the component. I've noticed that on these components, when a screen is loading, the text label will briefly load not vertically centered and then finally will center itself. Essentially, the text on the components "jump" to center on a component loading. It doesn't matter if this is a template parameter or done directly with a non-templated component. For cached screens/windows, this only happens on the initial load.

This does seem to be more noticeable on less capable systems running clients (ie. take longer to load components, thus making the effect more noticeable). This "jump" in the text position still exists on more powerful systems but happens so fast it is not noticeable.

Is there a way to center text without this effect, or mitigate it on 'low end' clients? I realize I am asking two different things here (prevent the behavior vs. improving client performance).

I'm pretty sure the HTML support is simply a hand-off to Java Swing. Which means it is unlikely to be fixable by IA. Or have any specific work-around. There's a slight chance that it is a "Look-and-Feel" UI effect, for which IA might have some leverage. You'd have to open a support ticket to find out for sure.

1 Like

Thanks. The best thing I can do in the short term is probably use a faster system (currently running on a machine with an Atom processor which is a bit sluggish). I'll think about a ticket if it end up being an issue.

i dont use vision much, but can you use this system to write in your own css? or is only this thing possible? is definitly not standard html/css so maybe if its possible to use that it might improve performace.


oh nvm its just to old for me xd

It's an ancient version of HTML. 3.2, I think. There's no way to set separate CSS, but you can included some styles in-line.

1 Like

if so then this should do the same, if its supported in that version

<p style="text-align:center">

Your best bet might be to sit back and see if it nerd-snipes a certain IA employee über-geek (cough PGriffith cough).

2 Likes

:joy:
This is a OEM application (plan to productize the system) so there is some sensitivity to look and feel / UX. Generally this has not been an issue with other HMI / SCADA platforms I've used, which puts in in an odd position needing to defend the platform choice over small things when all others see is some odd UI behavior that "doesn't behave like this in [insert HMI platform I've used for 20 years here]!".

I've been encouraged by others to use Perspective but the ship has sailed on that choice for the moment (plus in general I don't think I have the time to commit to the learning curve).

If this is an on-machine HMI for control purposes, they are simply wrong.

<html><div style="text-align:center">
this appears to be the same as <html><center> idk if its more perfomant tho

(left just html, middle is html<center right is <div style="text-align:center")

1 Like

You're correct, it's Swing builtin behavior and I'm pretty sure doesn't fire a property change or any other event that's useful.

Your options are limited in terms of workarounds. Maybe an invoke later setting the labels visible would do it? Kinda hacky. Or a template canvas to do the centering, but that's way heavier in terms of resource usage.

A Jide StyledLabel is supposed to be more performant, but we don't have any direct way to instantiate one as a regular component, so you'll have to use some hacky-ish scripting or create a custom module (cough Phil cough :slight_smile:).

2 Likes

The odds that an OEM HMI isn't Edge is low, and I can't deploy my modules in Edge. Probably worth doing, though. (Darn you! You aren't supposed to be sniping back!)

4 Likes

Correct that it is a "panel style" on-machine HMI. That was my gut reaction too much didn't want to be the guy who refuses to change because that's what I'm used to using :sweat_smile:

Thanks, I kind of figured that may be the case. This is more of an annoyance than an actual problem. I can mitigate this in the future by specifying a better PC where this is not really noticeable.

1 Like

Yes, this is Edge : )

1 Like

odds are the styled div is more performant, (as im assuming center became deprecated for a reason)