Vision Component Layout

I always seem to have issues setting up components in layouts properly so that they’re displayed “correctly” (the same in designer and in client).

For example. I have this window made up of a bunch of components and looks like so in the designer:

but in the client, it looks like this:

Why does the tab strip move?
Why does the text get shifted in some places and truncated in others?

This behavior is repeated with both relative and anchored layouts.
I have the popup window set to un-resizable and un-maximizable.

Even pressing the preview button inside of the designer shows it correctly, so why is it messed up in the client?

The designer always uses fixed pixel coordinates, no scaling for resolution.

The client can scale. Each window and container and component has layout properties that control its scaling behavior, if any, and the impact on fonts. You should study that part of Inductive University.

I’ve watched it a few times. It says to use anchored layout for things like forms and tables, which is pretty much what this is.

Everything on my Window is anchored to the top left (every component, and every component within the groups). Layouts are enabled for the window.

It looks more-or-less correct on 1440p:

But not on 1080p:

I just don’t understand how I’m supposed to line things up and have it scale correctly.

One of the first rules for Vision: Design at the smallest size practical - ideally, lower than any actual client’s resolution. It’s much, much easier to Vision to scale up practically than to scale down.

It’s unfortunate that your design has the tab strip ‘anchored’ to the right size. There’s no good way to do that in Vision, because the tab strip just isn’t flexible in that way (it’s not a ‘real’ JTabbedPane, it’s a custom component pretending to be one). You could maybe switch to using something like a multi-state button; it’ll require more effort to look the same, but not that much.

Where is the padding around the outside coming from? I would do that with a thick border on the root container, rather than trying to position components “inside” the edges - that way, there’s no way for a component to sneak ‘past’ the edge, also.

1 Like

Thanks for the idea on the workaround for that right-justified tab strip. I’ll do that since I’m using a script anyway, as this is a popup window.

I have designed it to look correct in the client at 1080p
client 1080p:

However, the text doesn’t quite scale correctly.
client 1440p:

Is this due to the text size being an integer?

Are your unit labels separate labels on the root container? You could try grouping/containering the value + label, or even making a template for the repeated unit + label set. Then you shouldn’t have to worry about overlap and scaling quite as much.

1 Like

Right now I have each row (within each box) as a single line. I think separating the labels may alleviate that scaling issue.

Thanks