Welcome! Log In Create A New Profile

Advanced

WB12 Page Template footer

Posted by Jeff Graham 
Jeff Graham
WB12 Page Template footer
September 17, 2008 09:15PM
I have a page template that I want to add a footer which is a single HTML Control. However, my pages vary in length and so any position I select is not correct for some pages. Is there a way to cause the the HTML control to position itself after the last control on the page?

Thanks,
Glenn Rathke
Re: WB12 Page Template footer
September 17, 2008 09:34PM
Hi Jeff,

I'm not sure how this will work but will get you close to what you want

Can you make the footer control moveable but not with the mouse.

In the initialization code of the form set the Y property of the footer equal to the y property of the last control + height of the last control

HTH
Glenn Rathke
Glenn Rathke
Re: WB12 Page Template footer
September 18, 2008 12:48AM
I just tried what I suggested:

CELL_FOOTER..Y = BTN_Button1..Y + BTN_Button1..Height

and if I'm understanding you correctly, it does what you're asking for.


I expanded a little further and came up with this. You don't need to know which control is last, helpful when you allow the user to move the controls around:

Y is int
i is int = 1
ResControl is string
ResControl = EnumControl(MyPage, i)
WHILE NoSpace(ResControl) <> ""
IF ResControl <> "CELL_FOOTER" THEN
IF {ResControl}..Y + {ResControl}..Height > Y THEN
Y = {ResControl}..Y + {ResControl}..Height
END
END
i++
ResControl = EnumControl(MyPage, i)
END

CELL_FOOTER..Y = Y + 10 // position the header 10 below the last control


HTH
Glenn Rathke



Edited 1 time(s). Last edit at 09/18/2008 02:33AM by Glenn Rathke.
Jeff Graham
Re: WB12 Page Template footer
September 18, 2008 01:49AM
Thanks Glenn, I think that will work fine.

Jeff
Peter Holemans
Re: WB12 Page Template footer
September 20, 2008 01:50PM
Easy...
Create a PageHeader template, a PageBody template (optional) and a PageFooter template. These are three different templates. Now assign the three templates to your page and override (right click) the size and position of the main cells that are inheritted from the body template and the footer template.Works fine!

Cheers,
Jeff Graham
Re: WB12 Page Template footer
September 21, 2008 04:31PM
Hi Peter,

Thanks for the suggestion. That works just fine.

I also created a control template and put that at the bottom of each page which worked also.

Jeff
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: