[R] Tktable do not expand inside a Tkframe

Cleber N.Borges klebyn at yahoo.com.br
Fri Dec 4 02:31:40 CET 2015



hello all,

I'm trying to build a table within a frame. I would like the table to
expand when the entire window is expanded.
I could not find examples of how to solve this problem.
I thank you in advance for help.

Cleber
#######################################
# piece of the code

library( tcltk )
tclRequire( "Tktable" )
dataorgW <- tktoplevel()
fmMenu <- tkframe( dataorgW, borderwidth=10, relief="groove", bg='red' )
tkpack( fmMenu, expand=1, fill='both' )

scrX <- tkscrollbar( fmMenu, command=function(...) tkxview( tableData,
... ), orient="horizontal" )
scrY <- tkscrollbar( fmMenu, command=function(...) tkyview( tableData,
... ), orient="vertical" )

height <- -1; width <- -1

tableData <- tkwidget( fmMenu, "table", rows=50, cols=50,
                      titlerows=1, titlecols=1,
height=height+1,width=width+1,
                      xscrollcommand=function(...) tkset( scrX, ... ),
                      yscrollcommand=function(...) tkset( scrY, ... ),
                      rowstretch='all', colstretch='all'
                      )

tkconfigure( tableData, multiline=0 )
tkgrid( tableData, scrY )
tkgrid.configure( scrY, sticky="nsw")
tkgrid( scrX, sticky="new" )

tclarray <- tclArray()
tkconfigure( tableData, variable=tclarray, selectmode="extended",
background="white" )






---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus

	[[alternative HTML version deleted]]



More information about the R-help mailing list