gs:set-border-layout not working as expected...
Posted: Sun Jan 13, 2013 4:36 am
Hi!
This may just be that I'm not reading the documentation closely enough, however if I understand correctly, the "border" layout style allows five sections -- north, south, east, west and center -- and they should work together.
So, this piece of code should show a red box on top, with the bottom divided evenly between a green box on the left and a blue box on the right.
Instead I get a single blue box that fills the entire frame. Any ideas? Thanks!
I've tried using separate (gs:add-to) calls and putting the panels inside an inset panel with the border layout, but nothing seems to work. By the way: newLisp v10.4.4, newLISP-GS v.1.47 on Windows 7
This may just be that I'm not reading the documentation closely enough, however if I understand correctly, the "border" layout style allows five sections -- north, south, east, west and center -- and they should work together.
So, this piece of code should show a red box on top, with the bottom divided evenly between a green box on the left and a blue box on the right.
Instead I get a single blue box that fills the entire frame. Any ideas? Thanks!
Code: Select all
(load (append (env "NEWLISPDIR") "/guiserver.lsp"))
(gs:init)
(gs:set-trace true)
(gs:set-look-and-feel "javax.swing.plaf.metal.MetalLookAndFeel")
(gs:frame 'main 100 100 512 512 "Layout Test")
(gs:set-border-layout 'main)
(gs:panel 'i1 100 100) (gs:set-color 'i1 1 0 0)
(gs:panel 'i2 100 100) (gs:set-color 'i2 0 1 0)
(gs:panel 'i3 100 100) (gs:set-color 'i3 0 0 1)
(gs:add-to 'main 'i1 'north 'i2 'west 'i3 'east)
(gs:set-visible 'main true)
(gs:listen)