Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ggroup

Basic box container


Description

Basic box container

S3 generic whose methods are implemented in the toolkit packages

The svalue method refers to the main property of the box container, its spacing. There are generally two types of spacing: padding around border of the box and spacing between each child that is packed in. The spacing here is the between-child-component spacing. The reference class method set_borderwidth can be used for the other.

Avoids need to type horizontal=FALSE

Usage

ggroup(horizontal = TRUE, spacing = 5, use.scrollwindow = FALSE,
  container = NULL, ..., toolkit = guiToolkit())

.ggroup(toolkit, horizontal = TRUE, spacing = 5, use.scrollwindow = FALSE,
  container = NULL, ...)

## S3 replacement method for class 'GGroup'
 svalue(obj, index=TRUE, ...) <- value

gvbox(spacing = 5, use.scrollwindow = FALSE, container = NULL, ...,
  toolkit = guiToolkit())

Arguments

horizontal

logical. If TRUE, left to right layout, otherwise top to bottom

spacing

spacing aroud widget

use.scrollwindow

logical. Either TRUE, "TRUE", FALSE, "FALSE", "y", or "x". For all toolkits a non-FALSE value will place the child components into a scrollable container. For some toolkits this will only be in the direction of packing. If the toolkit allows it (RGtk2), then values of "x" or "y" can be used to override the default scrolling directions. A box container with scrollwindows should have it size set either directly or through packing with expand=TRUE as its size request will not reflect the size of its child components.

container

A parent container. When a widget is created it can be incorporated into the widget heirarchy by passing in a parent container at construction time. (For some toolkits this is not optional, e.g. gWidgets2tcltk or gWidgets2WWW2.)

...

These values are passed to the add method of the parent container. Examples of values are expand, fill, and anchor, although they're not always supported by a given widget. For more details see add. Occasionally the variable arguments feature has been used to sneak in hidden arguments to toolkit implementations. For example, when using a widget as a menubar object one can specify a parent argument to pass in parent information, similar to how the argument is used with gaction and the dialogs.

toolkit

Each widget constructor is passed in the toolkit it will use. This is typically done using the default, which will lookup the toolkit through guiToolkit.

obj

GGroup object

index

ignored

value

value (in pixels) for between child spacing

Details

Child components are typically added to a box container through the child components constructor. The argument expand, fill, and anchor determine how the child is positioned within the container.

Value

a GGroup instance.

a GGroup instance with vertical packing.

See Also

Examples

if(interactive()) {
  w <- gwindow("Box containers")
  g <- gvbox(cont=w)                         # ggroup(horizonta=FALSE, ...)
  nb <- gnotebook(cont=g); gbutton("one", label="one", cont=nb)
  gframe("Frame", cont=g)
  pg <- gpanedgroup(cont=g); gbutton("one", cont=pg); gbutton("two", cont=pg)
}

gWidgets2

Rewrite of gWidgets API for Simplified GUI Construction

v1.0-8
GPL (>= 3)
Authors
John Verzani
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.