Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!decwrl!stanford.edu!rigel.csc.ti.com!sung From: sung@rigel.csc.ti.com ("Helen Chang ", sung@csc.ti.com) Newsgroups: comp.windows.interviews Subject: Re: TBBox problem from Jun Rekimoto Message-ID: <9106271418.AA00301@rigel.csc.ti.com> Date: 27 Jun 91 14:18:30 GMT Sender: news@shelby.stanford.edu (USENET News System) Organization: Internet-USENET Gateway at Stanford University Lines: 73 > Jun Rekimoto said, > I have found a little trouble with TBBox. I want to get a layout such as: +++++++ ++++++++++++++++++++ + + + + + A + + + + + + + +++++++ + + +++++++ + + + + + C + + B + + + + + + + +++++++ + + + + + + ++++++++++++++++++++ You can achieve your target layout using VCenter, such as used in the modified program below. Please refer to Paul Calder's message date 14 Jun 91 on "Subject: Re: Glyph: :request()" Helen Chang ==================================================================== #include #include #include #include #include #include #include #include , 1.0) #include #include int main(int argc, char** argv) { World world("Test", argc, argv); Color* fg = world.foreground(); Color* bg = world.background(); Font* f = world.font(); Glyph* A = new Border( new Margin( new LRBox(new Label("BOX A", f, fg), new TBBox(new VGlue(1.0*inch))), 0.2*inch), fg, 0.1*inch); Glyph* B = new Border( new Margin( new LRBox(new Label("BOX B", f, fg), new TBBox(new VGlue(1.0*inch))), 0.2*inch), fg, 0.1*inch); Glyph* C = new Border( new Margin( new LRBox(new Label("BOX C", f, fg), new TBBox(new VGlue(3.0*inch))), 0.2*inch), fg, 0.1*inch); Glyph* top = new Background(new LRBox(new VCenter(new TBBox(A, B),1.0), new VCenter(C,1.0) ), bg); Window* w = new ApplicationWindow(top); w->map(); world.run(); return 0; }