On Wed, Aug 6, 2008 at 4:46 AM, Antje <[EMAIL PROTECTED]> wrote: > Hi Tamas, > > thanks a lot for your answer. > >> Hi, >> >> I would recommend to explore >> http://wiener.math.csi.cuny.edu/pmg/gWidgets >> especially the Examples section: >> http://wiener.math.csi.cuny.edu/pmg/gWidgets/Examples >> and the useR!2007 presentation: >> http://wiener.math.csi.cuny.edu/pmg/gWidgets/useR2007_presentation.pdf >> I hope it helps. >> > > These tutorials I already found but still I don't know how to create a > flexible layout. For example (simple one), I'd like to have a window with a > text field with fixed width on the one side (stretched over the whole > height) and on the remaining right side, I'd like to put a button with a > fixed height but width adjustet to the remaining space of the window. > > This code would not give me the layout I'd like to see and I don't know how > to do it (even with the tutorials mentioned) > > <pre> > mainwin <- gwindow(title = "TestApplication", visible = TRUE, name=title) > splitgroup <- ggroup(horizontal=TRUE, container=mainwin) > > gtext(text = "Here we go", width = 150, container=splitgroup) > gbutton("push me", container = splitgroup, expand = TRUE) > size(mainwin) <- c(500,500) > </pre> > > I don't even know if there is any way to do what I want... >
It looks to me that the thing missing there is the vertical squashing of the button on the right side. To do that, you'll want to use a vertical group on the right side i.e. ggroup(horizontal=FALSE, container = splitgroup). Then make the button not expand (in a vertical group it will always expand horizontally), gbutton("push me", container = rightgroup, expand = FALSE). I think that should help. The problem I have with gWidgets is that the button labels seem misjustified. Does anyone else have this problem? Michael > > Antje > > > >> Tamas >> >> >> >> On Wed, 2008-08-06 at 08:19 +0200, Antje wrote: >> >>> Hello everybody, >>> >>> is there any nice tutorial how to use gwidgets? Of course, I've found how >>> to create simple elements like buttons, but I could not figure out for >>> example how to create a window with a special size and a gtree on the left >>> side (taking the whole height of the window) and some other elements on the >>> right side...o especially I'm looking for information about layout design >>> possibilities... (or limitations) >>> >>> Antje >>> >>> _______________________________________________ >>> R-SIG-GUI mailing list >>> R-SIG-GUI@stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/r-sig-gui >>> >>> >> >> > _______________________________________________ > R-SIG-GUI mailing list > R-SIG-GUI@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/r-sig-gui > [[alternative HTML version deleted]] _______________________________________________ R-SIG-GUI mailing list R-SIG-GUI@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-gui