On Thu, Jul 3, 2008 at 8:58 AM, Sebastian P. Luque <spluque@gmail.com>
wrote:

> [...]
>
> > The handlers in the various toolkits have several different arguments,
> > none of course being standard. The ... is to accommodate
> > these. Whereas, the first argument for a handler, called "h" from the
> > iWidgets background of gWidgets, is a list containing components "obj"
> > to refer to the object that the handler is called on, such as the
> > slider in your example, and "action" which just passes along the
> > action= argument. (Some widgets have additional components, such as
> > "dropdata" or "x" and "y".) The h$obj construction allows you to avoid
> > global variables. So the following are equivalent:
>
> > sl = gslider(cont=gwindow(), handler = function(h,...)
> > print(svalue(sl)))
>
> > and
>
> > sl = gslider(cont=gwindow(), handler = function(h,...)
> > print(svalue(h$obj)))
>
>
> Thanks for the explanation!
>
> On another note, I got a bit confused the other day trying to learn more
> about layout from the density example given in the vignette.  I was
> trying to get the following layout:
>
>
> Basically, move the bandwidth slider below the graph and spanning the
> whole width of the window.  Modifying the layout section of the code as:
>
> ---<---------------cut here---------------start-------------->---
> window <- gwindow("gWidgetsDensity")
> bigGroup <- ggroup(container=window)
>
> vGroup <- ggroup(horizontal=FALSE, container=bigGroup)
> hGroup <- ggroup(horizontal=FALSE, container=bigGroup)
>
> tmp <- gframe("Distribution", container=vGroup)
> add(tmp, distribution)
>
> tmp  <- gframe("Sample size", container=vGroup)
> add(tmp,sampleSize)
>
> tmp <- gframe("Kernel", container=vGroup)
> add(tmp,kernel)
>
> add(bigGroup, ggraphics())
>
> tmp <- gframe("Bandwidth adjust", container=hGroup)
> add(tmp,bandwidthAdjust, expand=TRUE)
> ---<---------------cut here---------------end---------------->---
>
> Why is the slider still packed side by side, when I'm specifying
> 'horizontal=FALSE' in hGroup?
>
> I also notice that one needs to do something in a widget to produce the
> initial plot, i.e. a default initial the plot is not produced.
>

It sounds like you want a top-level vertical group that contains two
horizontal groups. The first contains the vertical controls and graph and
the second contains your horizontal controls.

Does this help?
Michael


>
>
> Thanks for any further pointers,
> --
> Seb
>
> _______________________________________________
> 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]]

