Questions tagged [tkx]

Tkx is an interface to Tk from Perl. Tk is a GUI toolkit tied to the Tcl language; Tkx provides a bridge to Tcl that allows Tk based applications to be written in Perl.

Description

The philosophy of Tkx is to provide a very thin wrapper on top of Tcl. You get exactly the behavior described in the Tcl/Tk documentation with no surprises added by the Perl layer.

The Tkx documentation describes the mapping between Tcl syntax and Perl syntax, but defers most everything else to the Tk documentation. You should consult the documentation for the version of Tk that you're using.

TkDocs provides tutorials for using Tk with examples using bindings from several languages, including Perl via Tkx.

Related tags

40 questions
2
votes
2 answers

Trying to create a standalone app from a Perl script that uses tkx (Tcl/tk)

Here are my specs: OS X Tiger Perl 5.8 Using Tkx bundled with ActiveTcl v8.5 I've successfully created a standalone app with the above configuration using PAR/pp, but it's not a completely satisfactory solution: still requires Tcl/Tk to be…
Vlad the Impala
  • 15,572
  • 16
  • 81
  • 124
1
vote
0 answers

Resize Notepad based on holding frame

I'm trying to get the notepad to expand when dragging the main window .... and suggestions? I have it to where it reads the screen size but it won't keep the changing size of the window. All my attempts of add a loop have failed... is there anyway…
1
vote
1 answer

Does ActiveState PerlApp have a problem binding ico files as "Bound Files"

I posted this question at ActiveState but got no reply from support or in a discussion forum. Here is probably better. I'm a long time user of PerlApp (ver. 8.2.1 Build 292072) and I have experienced very few problems. But just recently, I've been…
LozzerJP
  • 856
  • 1
  • 8
  • 23
1
vote
1 answer

Flashing a GUI button using Perl & Ttk on a Mac

Using Perl v5.28, Tkx.pm v1.10 with ActiveState Tcl/TTk v8.6.9 ('aqua' style), on macOS v10.13.6. The demo below works as desired, enabling the calling of a given subroutine using either a GUI button push using the mouse, or using keyboard input…
KillerRabbit
  • 173
  • 1
  • 8
1
vote
3 answers

Perl CPAN can't install Tkx

I'm trying to install Tkx on my Mac, with Perl 5.16.0 under perlbrew. Keep getting this error: Test Summary Report ------------------- t/tcl.t (Wstat: 0 Tests: 18 Failed: 1) Failed test: 18 Files=8, Tests=54, 8 wallclock secs ( 0.04 usr…
RadlyEel
  • 309
  • 3
  • 11
1
vote
1 answer

How can i repeatedly prompt the user with Tkx?

Using Perl Tkx, I want to get some input from the user, close the window, and maybe do it again later. For user input, I'm just displaying some buttons, and the user gets to click on one of them. Here's what I have now: sub prompt_user { my…
Tim
  • 8,912
  • 3
  • 39
  • 57
1
vote
1 answer

How to get a "choose directory" dialog box using Perl Tkx on Windows 7?

I'm trying to invoke Windows 7's "choose directory" dialog box using Perl Tkx. This is what I'm using: my $dirname = Tkx::tk___chooseDirectory(); However, this doesn't display any dialog box, but instead causes my program to hang without providing…
epsilon_j
  • 325
  • 4
  • 14
1
vote
1 answer

Perl Tkx: How to pass a variable as a parameter to a button's callback

Given this Perl/Tkx code fragment: @itemList = ({'attrib1' => 'name1', 'attrib2' => 'value1'}, {'attrib1' => 'name2', 'attrib2' => 'value2'}); $row = 0; foreach $item (@itemList) { push(@btn_list, new_ttk__button(-text =>…
Colin Wu
  • 611
  • 7
  • 25
1
vote
2 answers

Perl Tk/Tcl: Can widget callbacks take parameters

Is it possible to create a button, for example, whose callback takes a parameters? e.g. button(-text => 'Row1', -command => \&do_something_with('Row 1')); Tried it on a test program and it doesn't seem to. If that is the case, is there some other…
Colin Wu
  • 611
  • 7
  • 25
1
vote
1 answer

Perl Command Line Interpreter crashing on exit

I have an issue where exiting a Perl Tkx script causes the Perl Command Line Interpreter to crash. Ex: use strict; use warnings; use Tkx; my $mw = Tkx::widget->new('.'); my $button = $mw->new_ttk__button(-text => "Hello", -command =>…
tjwrona1992
  • 8,614
  • 8
  • 35
  • 98
1
vote
0 answers

Limiting a Tkx::tk___chooseDirectory() search to specific directories

I have a Perl script that uses Tkx::tk___chooseDirectory() to allow the user to select a directory. The problem is only a few specific directories are valid for the actions that the script is going to perform. Is there a way to limit the folders…
tjwrona1992
  • 8,614
  • 8
  • 35
  • 98
1
vote
1 answer

Retrieving stdout and stderr while using tkx::open to run external commands

I have managed to run external commands from Tk GUI in Perl (Tkx module) without blocking the GUI. However, I have difficulty to retrieve messages from stderr and stdout: for most commands, nothing is stored in variables $stdout and $stderr. What am…
Jean-Francois T.
  • 11,549
  • 7
  • 68
  • 107
1
vote
1 answer

Loop to define buttons in Perl / Tkx

I am trying to define a sequences of buttons in Perl with Tkx through a loop; the text and actions of each button is defined in an array of hash tables. However, no matter what button I click on only the action of the last button is triggered. This…
Jean-Francois T.
  • 11,549
  • 7
  • 68
  • 107
1
vote
2 answers

Perl : Cancel a batch process, ran using a system call, in a thread, from main

Hello pips, I have a Tkx gui which runs a batch file using button. The batch file is executed in a different thread, cause I want the GUI to still be usable. I want to implement a cancel button to cancel the execution of the batch file. I tried…
rezeile
  • 41
  • 7
1
vote
1 answer

How do I create a sash in Perl Tkx?

Does anyone know how to create a sash object in Perl Tkx? I am using ActivePerl and Perl 5.10.
user217373
  • 11
  • 1