Questions tagged [tcltk]

The tcltk package is an embedding of Tcl/Tk in R. Use tcl and tk tags for the actual Tcl and Tk software packages themselves.

74 questions
1
vote
1 answer

How to bind some variable value in tcl/tk?

Let say we have some variable x, initially x=0. Whenever x changes its values from 0 to 1, click some button A Whenever x changes its values from 1 to 2, click some button B Whenever x changes its values from 2 to 0, click some button C ... How…
1
vote
0 answers

File selection window opens behind R main window

I saw this question has been asked before but not answered. When using tcltk::tk_choose.files() the first time during an R session it opens behind the R main window. All further times it opens in front of the main window (as it should!). Is there a…
yasel
  • 433
  • 3
  • 13
1
vote
0 answers

Center window (tcl/tk library) in R

I would like to center my dialog created with the tcl/tk library, but it is being impossible due to the shallow existing documentation and the low level of tcl/tk. Basically what I'm looking for is to center the tktoplevel: tt <- tktoplevel() I…
Vadym
  • 11
  • 2
1
vote
1 answer

Troubles with select.list()

I was trying to generate a dialog box where a user can select elements to keep, however the item I want to keep is a character but it looks like R is giving them numeric values based on their alphabetical rank. Here's an example (I would prefer the…
BBlank
  • 58
  • 5
1
vote
1 answer

How come XQuartz/X11 makes the file explorer called with tk_choose.files look like this?

MacOS: High Sierra, version 10.13.6 R version: 3.6.1 R studio verison: 1.2.1335 I have been using Anaconda to manage my R packages for a while now. However, I keep getting errors in regards to C and Fortran compilers when trying to install and run…
embacify
  • 384
  • 1
  • 2
  • 9
1
vote
0 answers

How to show "R console content" in the developed graphical user interface (GUI)

I have developed a graphical user interface (GUI) in R using gWidgets. Here is some lines of the code: library(gWidgets) library(rattle) library(RGtk2) library(tcltk) ## Draw main window: main_win <- gwindow("Advanced FFDFS: 4-day & 8-day forest…
Canada2015
  • 187
  • 1
  • 12
1
vote
1 answer

how to link a program from different shell in tcl

I was trying to build a GUI for an open source software using TCL/TK. This open source works in a different shell. so, How do I open it (vagrant ssh) from TCL? for example "~/openthread/etc/vagrant/vagrant up" this is the path for the shell which…
jg0310
  • 19
  • 5
1
vote
1 answer

How to clear tk2text box in R tcltk2, tcltk

I am trying to clear the content of a text box which i created using Window_1$env$txt1 <- tk2text(Window_1, width = 90, height = 1) I can update the values using tkinsert(Window_1$env$txt1 "end", "test") But can someone help me how to clear the…
Thevandalyst
  • 79
  • 1
  • 2
1
vote
0 answers

How to make tkmessagebox on the top of all windows

I run r via rstudio using Windows, however, when I run the following code library(tcltk) tcltk::tk_messageBox(title = "Confirm", message = "message", icon = "question", type = "yesno", …
Mohamed
  • 95
  • 7
1
vote
1 answer

R freezes when trying to load tcltk package on MacOS

I tried to load the packages aplpack and the console stay frozen with message Loading required package: tcltk as follow: > library("aplpack") Loading required package: tcltk and I eventually had to reload RStudio I also tried the following command…
ecjb
  • 5,169
  • 12
  • 43
  • 79
1
vote
1 answer

Prevent from window resizing (tcltk in R)

I created a GUI window with tcltk package in R. The window looks like this one: When I add radio buttons to or remove them from the window (by pressing buttons "Add C" or "Del A"), the window resizes. How can I prevent this behavior and create a…
GegznaV
  • 4,938
  • 4
  • 23
  • 43
1
vote
1 answer

Can't find tk2toplevel function in any R package

I am learning how to Develop GUI with R and found this nice tutorial. library(tcltk2) win3 <- tk2toplevel(title = "Tk2 window", manage = "grid", padx = 70, pady = 30) win3$butOK <- tk2button(text = "OK", width = -6, command =…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
0
votes
1 answer

Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host:

My R code (see below) generates these errors in some cases: [1] "2023-08-12 16:47:37.463" Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: api.abc.com Request failed [ERROR]. Retrying in 1.3 seconds... Error in…
user2165379
  • 445
  • 4
  • 20
0
votes
1 answer

How to move a tcl/tk window you didn't construct yourself to toplevel?

I'm running test_directory <- tcltk::tk_choose.dir() (from the tcltk package) which works and does what I want, but it consistently appears hidden behind RStudio. (tkchoosedirectory() seems to behave the same way.) Is there a way to make the…
0
votes
0 answers

How to get a frame geometry on window resize using R and TCL/TK

I would like to scale an image according to the size of a frame that is not the toplevel, for that I'm trying to get the geometry of said frame and re-plot the image according to the results that will be returned. At the moment I'm trying only to…
Matheus Fernando
  • 159
  • 3
  • 11