Jumpy Margins in New Tab Windows, & Editing Forms

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2443
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Jumpy Margins in New Tab Windows, & Editing Forms

Post by Jaymer »

This issue arises when you specify New Tab Settings, and override the T/R/B/L Margins to 0.
If you never do this, this prolly doesn't apply to you.

To have more available screen area, whenever I specify "New Tab" for output of a menu command, start process, query, etc., I [almost] always set the following:
newtab1.PNG
newtab1.PNG (11.9 KiB) Viewed 3459 times
Without the margin settings, this is how the upper left of my screen looks:
newtab2.PNG
newtab2.PNG (57.64 KiB) Viewed 3459 times
Setting the margins to 0 (1st pic) results in tighter margins when the grid/form opens as shown here:
newtab3.PNG
newtab3.PNG (62.13 KiB) Viewed 3459 times
(continued)
Last edited by Jaymer on Wed Oct 23, 2019 8:47 pm, edited 1 time in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2443
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

(continued)

Post by Jaymer »

All is good until the form (in this case) gets redrawn (by just doing a Save and not closing the form, or running a process/panel operation that causes a refresh).

So Editing a record in the above grid brings up a form like this, in a New Tab with tight margins:
newtab4.PNG
newtab4.PNG (33.91 KiB) Viewed 3457 times
Under default conditions, then it redraws to this:
newtab5.PNG
newtab5.PNG (31.3 KiB) Viewed 3457 times
The most annoying part of this to me isn't the extra margins, but the screen "jumps" to the right and lower when it redraws, because the margins change.
Been like this for years and I finally decided to fix it.

A simple CSS fix is all thats needed.
In your Properties of the FORM (not the Section), add a class like this:
newtab6.PNG
newtab6.PNG (2.9 KiB) Viewed 3457 times
And add this simple CSS line somewhere in your system (the How & Where has been covered here many times before).

Code: Select all

/* Force 0 px margins for Forms */
.margin_0 {
margin: 0px!important;
}
The name "margin_0" can be changed to anything you want.
After saving the CSS, remember to hold SHIFT down while you refresh your browser.
Last edited by Jaymer on Wed Oct 23, 2019 8:48 pm, edited 4 times in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2443
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

(reserved)

Post by Jaymer »

.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2443
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Jumpy Margins in New Tab Windows, & Editing Forms

Post by Jaymer »

I'm kinda surprised no one has commented on this.
I'm adding this to almost every form where I have a SAVE button and I stay on the form after SAVE.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply