Welcome! Log In Create A New Profile

Advanced

expandable area

Posted by Joel Waldron 
Joel Waldron
expandable area
October 05, 2008 04:58PM
Hi all -

I'm making a page template, the top is fixed, the bottom is fixed and I'd like to have the middle vertically expandable as I need to put more in various pages. What control is best to stick in there? A cell control, a table, other? How can I make a page template and still aloow the middle to be expandable?
Glenn Rathke
Re: expandable area
October 06, 2008 04:36AM
What I've done in the template code is loop thtough (enumerate) all the controls on the page and fine the one that is the furthers down the page (excluding my footer). Then I re[positoin my footer to be below that.

Then I calculate the difference between the header and footer and make my left menu panel height that size.

Here is the code:

Y is int
i is int = 1
ResControl is string
ResControl = EnumControl(MyPage, i)

WHILE NoSpace(ResControl) <> ""
IF ResControl <> "CELL_CORE_FOOTER" AND {ResControl, indControl}..Visible = True THEN
IF {ResControl, indControl}..Y + {ResControl, indControl}..Height > Y THEN
Y = {ResControl, indControl}..Y + {ResControl, indControl}..Height
END
END
i++
ResControl = EnumControl(MyPage, i)
END
//
CELL_CORE_FOOTER..Y = Y + 10 // position the header 10 below the last control
CELL_CORE_FOOTER..X = 0

CELL_CORE_LEFT_MENU..Height = CELL_CORE_FOOTER..Y - (CELL_CORE_HEADER..Y + CELL_CORE_HEADER.. Height)
M. Beaven
Re: expandable area
October 08, 2008 05:46PM
Perhaps I'm oversimplifying or missing the question, but you should be able to accomplish the same effect with three cells- Top, Middle, and Bottom. Make sure the box for allow overlay is unchecked, and the middle cell should push the bottom down. We have one site running in this fashion and it seems to accomplish the desired effect.

Regards,

-Marc
Glenn Rathke
Re: expandable area
October 08, 2008 08:03PM
Marc,

I think you're right.... Another case of making somehting more difficult than it needs to be :-)
Joel
Re: expandable area
October 09, 2008 04:36PM
Thanks to all!

I'll give the 3 cells a try!

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: