Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
resizing browse form to fit webbrowser window
resizing browse form to fit webbrowser window
Hi all,
just a question regarding resizing of browse forms.
I set automatic column widths at my browse form.
The width of the browse form adjusts to the size of the web browser window when opening the form but if the web browser window is not maximized that moment and you then maximize it the width of the browse form does not adjust again. It keeps the old width.
I need to reload (F5 or Enter in web browser address field).
This behaviour is the same in different web browsers on pc.
Is it possible to change this to always fit the maximized browser window? Perhaps by getting screen resolution instead of browser window size?
Thankyou very much in anticipation &
Best wishes
Andrea
just a question regarding resizing of browse forms.
I set automatic column widths at my browse form.
The width of the browse form adjusts to the size of the web browser window when opening the form but if the web browser window is not maximized that moment and you then maximize it the width of the browse form does not adjust again. It keeps the old width.
I need to reload (F5 or Enter in web browser address field).
This behaviour is the same in different web browsers on pc.
Is it possible to change this to always fit the maximized browser window? Perhaps by getting screen resolution instead of browser window size?
Thankyou very much in anticipation &
Best wishes
Andrea
-
- Posts: 132
- Joined: Sun Dec 16, 2018 6:13 pm
- Location: România
- Has thanked: 30 times
- Been thanked: 4 times
Re: resizing browse form to fit webbrowser window
It's not exactly a solution to your problem, if you use it:
the dimensions of the columns will keep the size as you set it, regardless of the size of the window.
Code: Select all
nuStopBrowserResize();
nuBuilderForte .... BIG Like !!!
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: resizing browse form to fit webbrowser window
Add this code before the function nuOnLoad() under Setup-> Header:
Code: Select all
function nuResizeBrowseColumns(force){
var w = nuFORM.getCurrent().column_widths;
var t = 0;
var p = nuTotalWidth('nucell_0_0') - $('#nucell_0_0').width(); //-- padding
if((nuFORM.getCurrent().refreshed != 0 && force !== true) && nuMainForm()){return;}
if(nuMainForm()){
for(var i = 0 ; i < w.length ; i++){
t = t + w[i];
}
for(var i = 0 ; i < w.length ; i++){
w[i] = parseInt((window.innerWidth - 30) * w[i] / t) - p;
}
}else{
var W = nuTotalWidth('nuBrowseFooter') + 22;
$('#nuDragDialog', window.parent.document).css('width', W + 14);
$('#nuWindow', window.parent.document).css('width', W);
$('body').css('width', W);//.css('padding', '0px 0px 0px 7px');
}
if(nuFORM.getCurrent().refreshed != 0 && force !== true){return;}
nuSetBrowserColumns(w);
}
$(window).resize(function() {
clearTimeout(window.resizedFinished);
window.resizedFinished = setTimeout(function(){
if (!nuIsIframe()) nuResizeBrowseColumns(true);
}, 250);
});
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: resizing browse form to fit webbrowser window
@gerese: There's an option in the form settings that was added some time ago.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 132
- Joined: Sun Dec 16, 2018 6:13 pm
- Location: România
- Has thanked: 30 times
- Been thanked: 4 times
Re: resizing browse form to fit webbrowser window
Hi Kev1n,
Hi Kev1n, I have this behavior with the window resizing code when I try to access the properties of an object:
Hi Kev1n, I have this behavior with the window resizing code when I try to access the properties of an object:
You do not have the required permissions to view the files attached to this post.
nuBuilderForte .... BIG Like !!!
-
- nuBuilder Team
- Posts: 4292
- Joined: Sun Oct 14, 2018 6:43 pm
- Has thanked: 71 times
- Been thanked: 444 times
- Contact:
Re: resizing browse form to fit webbrowser window
This should fix it:
Code: Select all
$(window).resize(function() {
clearTimeout(window.resizedFinished);
window.resizedFinished = setTimeout(function(){
if (!nuIsIframe()) nuResizeBrowseColumns(true);
}, 250);
});
Re: resizing browse form to fit webbrowser window
I just sent a donation by paypal to say thankyou.
Nubuilder is wonderful and your support is great! Many thanks for all your efforts!!!
Best wishes
Andrea
Nubuilder is wonderful and your support is great! Many thanks for all your efforts!!!
Best wishes
Andrea