ggroup: Basic box container

Description Usage Arguments Details Value See Also Examples

View source: R/ggroup.R View source: R/ggroup.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

gframe and gexpandgroup

Examples

1
2
3
4
5
6
7
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)
}

Example output

Loading required package: digest

gWidgets2 documentation built on May 29, 2017, 9:20 p.m.