[R] Tk table: how to get information about configurations ?
peter dalgaard
pdalgd at gmail.com
Sat Dec 5 16:28:02 CET 2015
> On 05 Dec 2015, at 15:24 , Cleber N.Borges <klebyn at yahoo.com.br> wrote:
>
> I understood that the configuration is done by the "tk configure"
> but I can not get the value of the properties back.
> like this:
>
> tkconfigure (table, background = 'red')
> tkcget (table, 'background') # give me an error
This corresponds to an argumentless option in Tcl, i.e.
.foo.tb cget -background
(compare .foo.tb configure -background red)
In the R/Tcl interface, this is accomplished done by passing NULL:
tkcget(table, background=NULL)
-pd
>
> thanks for you help
> cleber
> ##############################
>
> > tkconfigure (table, background = 'red', titlecol=1, multiline=0 )
> <Tcl>
> >
> > tkcget (table, 'background') # give me an error
> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
> [tcl] invalid command name ".1.1.1".
> > tkcget (table, 'multiline') # give me an error
> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
> [tcl] invalid command name ".1.1.1".
> > tkcget (table, 'titlecol') # give me an error
> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
> [tcl] invalid command name ".1.1.1".
> >
>
>
>
>
> Em 05/12/2015 11:40, phgrosjean at sciviews.org escreveu:
>> It depends what property you are looking for… Have you tried tkcget(table, …)?
>>
>> Philippe Grosjean
>
>>>
>>> Hello
>>> I would like to know the correct way of getting information about the values of the parameters of a Tktable.
>>> some details I even managed to extract but quite archaic form ...
>>> I thank you for advance for any help.
>>>
>>> cleber
>>> ###################
>>> # example
>>>
>>> library( tcltk ) ; tclRequire( 'Tktable' )
>>>
>>> tt <- tktoplevel() ; fm <- ttkframe( tt )
>>>
>>> tkpack( fm, expand=T, fill='both')
>>>
>>> # set info (geometry) of toplevel
>>> tkwm.geometry( tt, "600x400+400+200" )
>>>
>>> # get info (geometry) about toplevel
>>> tcl( 'wm', 'geometry', wDataOrg )
>>>
>>> table <- tkwidget( fm, 'table', background='white', selectmode="extended" )
>>>
>>> tkpack( table, expand=T, fill='both' )
>>>
>>> # how get informations about this table?????????????
>>> tkconfigure( table ) # ?????????
>>>
>>> tcl( table, 'xxxxx' ) # ???????????
>>>
>>> tcl( table, 'curselection' )
>>>
>>>
>>>
>>>
>>> ---
>>> Este email foi escaneado pelo Avast antivírus.
>>> https://www.avast.com/antivirus
>>>
>>> ______________________________________________
>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>
> ---
> Este email foi escaneado pelo Avast antivírus.
> https://www.avast.com/antivirus
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
--
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list