Description Usage Arguments Details Value Author(s) Examples
These functions provide/control a simulated tabbed notebook widget.
1 2 3 | tabnotebook_create(parent)
tabnotebook_display(tabnotebook, tabname)
tabnotebook_page(tabnotebook, tabname)
|
parent |
object of the class |
tabnotebook |
object of the class |
tabname |
character string specifying name of tabnotebook page |
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.
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.
P. Roebuck proebuck@mdanderson.org
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.