B4J Question Resizing all form contents based on screen resolution (best approach?)

MegatenFreak

Active Member
Licensed User
Hi.
I'm designing my software based on a 1366x768 resolution, so when I run it on 1920x1080, for instance, I get a lot of empty space inside the tab pages (other than the fact that everything is so small and harder to read). The idea I came up with was to use Java's setScaleX/Y methods on every single node within the form. But:
1. Though it fixes the size, the locations get messed up, and I'm not sure how to fix that since my nodes are "right-anchored" in the form and the node class itself only recognizes a "Left" property.
2. Is there an easier, hassle-free solution?
Thanks a lot in advance.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
everything is so small and harder to read). The idea I came up with was to use Java's setScaleX/Y methods on every single node within the form. But:
Sounds like a bad idea.

I've never seen a desktop app scales the text and all other elements when the window is resized.

Use anchors and designer script.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Upvote 0

MegatenFreak

Active Member
Licensed User
Erel has thought of everything. In the [B4X] B4XTable - Cross platform, sortable, searchable, customizable table example you can set the column size as wide as you want. When the required screen width becomes too large, you will automatically get a horizontal scroll bar.
Yeah, XUI views brings amazing options; unfortunately, my app is going to be used on all systems of an entire company, which is full of older systems, and each time I add an XUI view (like the new button, for example) the app crashes on those old systems, which I assumed is probably because their systems and OS is old (some have 32bit Windows XP!) and I could only install an old version of JRE (7, I think).
(In any case, I realized that putting every node inside a pane and scaling that pane scales everything else in correct size and coordinates, but I'll have to see what the project director thinks about that!
 
Upvote 0
Top