Nesting Framesets |
Every frame page contains an os_frameset
object that partitions the page into one or more view areas. These view areas
can also be partitioned because os_frameset objects
can be nested within other os_frameset objects. For
example, in the following illustration a Web page is partitioned into two
row-view areas. Then, the second view area is partitioned horizontally into two
column-view areas, resulting in three view areas.

The following example creates the Web page page that is partitioned into two row-view areas; one area is set to 20% of the display area and the other is set to 80%. The first view area displays the contents of the URL image2.html.
The second view area is named bottom_set and is partitioned into two column-view areas; one area is set to 75 pixels wide and the second is set to the remaining area. The first area in this frameset object displays the URL add1.html and the second displays the URL text3.html.
#include <iostream.h>
#include <ospace/web.h>
int main()
{
os_framed_page page( "Frame#2 Example", os_frameset::row, "20%", "80%" );
page << os_frame( "image2.html" );
// make the bottom row (the 80% row) split into two columns, the left
// column 75 pixels wide and the right column the remaining area.
os_frameset bottom_set( os_frameset::col, "75", "*" );
bottom_set << os_frame( "add1.html" )
<< os_frame( "text3.html" );
page << bottom_set;
cout << page;
return 0;
}

Copyright©1994-2026 Recursion
Software LLC
All Rights Reserved - For use by licensed users only.