tktabnotebook: Tk tabnotebook routines

Description Usage Arguments Details Value Author(s) Examples

Description

These functions provide/control a simulated tabbed notebook widget.

Usage

1
2
3
tabnotebook_create(parent)
tabnotebook_display(tabnotebook, tabname)
tabnotebook_page(tabnotebook, tabname)

Arguments

parent

object of the class tkwin representing the parent widget

tabnotebook

object of the class tkwin representing the tabnotebook widget

tabname

character string specifying name of tabnotebook page

Details

Tabnotebook widgets are created with tabnotebook_create.

The function tabnotebook_page creates a tabbed notebook page, a container in which to embed other widgets to display.

The function tabnotebook_display displays the requested page.

Value

The tabnotebook_create method returns a tkwin object representing the tabnotebook.

The tabnotebook_page method returns a tkwin object representing a page in the tabbed notebook.

Other methods are invoked for their side-effect.

Author(s)

P. Roebuck [email protected]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
  ## Not run: 
toplevel <- tktoplevel()
## Create tabnotebook
tabnotebook <- tabnotebook_create(toplevel)
tkpack(tabnotebook, expand=TRUE, fill="both")
## Create tabnotebook page and contents
pg1 <- tabnotebook_page(tabnotebook, "Page 1")
label <- tklabel(pg1, bitmap="info")
tkpack(label, side="left", padx=8, pady=8)
label <- tklabel(pg1, text="Something\non\nPage 1")
tkpack(label, side="left", expand=TRUE, pady=8)
## Create another tabnotebook page and contents
pg2 <- tabnotebook_page(tabnotebook, "Page 2")
label <- tklabel(pg2, text="Something else on Page 2")
tkpack(label, side="left", expand=TRUE, padx=8, pady=8)
## Controls are inherent; click on tabs to change pages
  ## :BUG: Example doesn't work, but it should. Why?
  
## End(Not run)

tclish documentation built on May 2, 2019, 4:53 p.m.