tk

How can I find out why my drag action momentarily freezes in Perl/Tk?

I'm seeing some occasional (one time in five), momentary (5-10 seconds) "freezing" when it dragspossibly as part of the -startcommand callback. It never happens on the first drag. The callback is simple enough; it just sets the text of the dragging cursor to the value that is being dragged: sub DragStart { my( $token ) = @_; my $w...

Understanding name spaces in POE-Tk

I posted "How to undersand the POE-Tk use of destroy?" in an attempt to reduce the bug in my production code to a test case. But it seems that the solution to the test case is not working in the full program. The program is 800+ lines long so I am hesitant to post it in full. I realize that the snippets I provide here may be too shor...

How to enable ruby to see tk in the require tk statement?

I am starting to learn the very basics of ruby on my iMac running Leopard. The version that is now on my system is ruby 1.8.6 But, I independently also installed ( via MacPorts ) ruby 1.9 because that corresponds to the latest "PickAxe" book. The installation location for ruby 1.8.6 is in /usr/bin/ruby The installation location for ru...

How do you reposition the main window under Perl Tkx?

Having more or less converted a lot of old Tk scripts over to Tkx I'm stuck for an port for the following function which repositions the window passed in as a parameter in the centre of the screen. I used to call this just before calling MainLoop, by which point Tk had obviously decided on the reqwidth and reqheight values. sub CenterWi...

Should I use Perl/Tk, Tcl::Tk or Tkx for a Perl GUI?

I really like Perl/Tk, but have come to the opinion that it's DOA. I think Tcl::Tk and Tkx are better solutions. Assume I drop Perl/Tk. Is the "most supported" route to go with Tcl::Tk (which hasn't been updated since 2007, and whose author seemingly cannot be reached), or Tkx? Are either of these actively used/supported? ...

Why is the creation order of widgets important?

The following code works fine. It displays a panedwindow, with a blue box on top and a green box below: panedwindow .root -orient vertical -showhandle true -background red frame .top -background blue -width 100 -height 100 frame .bot -background green -width 100 -height 100 .root add .top .bot pack .root -expand true -fill both Howeve...

Why are all the tk examples in a Python distribution written in TCL?

Now don't get me wrong, I'm not exactly a Python fan, but when you see a Tk directory inside of the python directory you kinda expect... Well Python. And yeah, I get that Tk came from TCL, but if I had to write a TCL to use Tk, I'd forget TK existed and use a completely different tool box. (The popularity of this combination completely ...

How can I have a Perl/Tk progress bar showing that an external process is running?

I am creating a Perl/TK GUI code that will call a seperate exe inside. The progress bar widget will be the only indication that execution is happening inside it but problem is, as you run the code, the progress bar freezes because it has to finish first the execution of the seperate exe and after it's done, activity on the progress can b...

How can I dynamically populate the values of TK combobox ?

I am new to tcl/tk programming. Here is a small code snippet on combo box. How can I dynamically add and remove values from the combo box? set ff [ frame f] set label [Label $ff.label -text "Name:" ] set name [ComboBox $ff.name \ -editable yes \ -textvariable name] set addButton [Button $ff.addButton -text "+" -width 1...

The Simplest Steps to Converting TCL TK to a Stand Alone Application

Hello: After running into major compatitiblity problems with C#, ASP.NET, MS Access, Linux, and Mono, I've decided to program in a language that is cross-platform, open source, and compatible with embedded databases that are also compatible with many platforms. I narrowed my choice down to TCL. Before I began a sample application with...

Steps to Create A Tcl Starkit on a Windows Platform

Hello: I am trying to figure out the basic steps to creating a Tcl starkit in Windows. I've asked a similar question before, as well as purchased a book on Tcl programming, visited wiki.tcl.tk, emailed Tcl programmers directly, etc... In all, I've received great feed back from my resources and this website; however, I've failed to exp...

Tkinter grid geometry manager size propagation (with sticky)

I'm missing something about how sizes propagate in Tk. Try this: from Tkinter import * root = Tk() frame1 = Frame(root, border=4, relief=RIDGE) frame1.grid(sticky=E+W) frame2 = Frame(root, border=4, relief=RIDGE) frame2.grid(sticky=E+W) label1 = Label(frame1, text='short', background='white') label1.grid(sticky=E+W) label2 = Label(fr...

Chaining Tk::BrowseEntry widgets together

I am facing some glitches using the -browsecmd and -listcmd options of Tk::BrowseEntry widget: I have three BrowseEntry widgets and each uses the value of the previous one as input for populating its own list. The values are used as arguments to a subroutine that pulls out the list of items in the drop-down list from a flat file databa...

How to draw a bitmap real quick in python using Tk only?

Here is a problem. I want to visualize a specific vector field as a bitmap. It's ok with the representation itself, so I allready have some matrix of RGB lists like [255,255,115], but I have no good idea of how to draw it on screen. So far I make thousands of colored 1px rectangles, but this works too slow. I'm sure there is a better way...

tk, tcl exec stderr, stdout separately

I have a tcl script. The problem is that I have to call a script that can write something to stderr (it's not a critical failure). I would like to capture stderr and stdout separately in tk/tcl. if { [catch {exec "./script.sh" << $data } result } { puts "$::errorInfo" } This code will return my result but it also contains stderr....

Opening Excel and PDf files with Tcl Tk

Hello: I am having problems opening an existing Excel file with Tcl Tk. I am able to open an existing MS Word file with no problems. The code that I am using is as follows, also my test application has "package require tcom" included: proc OpenFile {} { #Path to file set app [::tcom::ref getobject "C:\\Users\\Me\\Desktop\\Test.doc"] ...

Ruby + Tk command binding - scope issue?

So I have this app require 'tk' class Foo def my_fancy_function puts "hello, world!" end def initialize @root = TkRoot.new{title "Hello, world!"} frame = TkFrame.new my_fancy_button = TkButton.new(frame) do text "Press meee" command {my_fancy_function} pack end frame.pack Tk.mainloop ...

Linking Tcl/Tk to Python 2.5

Hi, I have an existing Python 2.4 and it is working properly with tkinter as I tested it using python import _tkinter import Tkinter Tkinter._test() Now, I have installed python 2.5.2 but when I try the same tests (with the newer version), it returns (but the same tests are working for the previous ve...

Create a Fully Featured Environment For Tcl/Tk Development Under Windows

I'm now learning Tcl/Tk, but as I'm running Windows, I want to create a fully featured(professional) development environment for this language, but I need to know: Which tools I need to install(first of all)? What are the IDEs that support Tcl/Tk development? What is the best text editor to develop in? Where I can find some librarys fo...

How To Distribute a Project Built In a Interpreted Language?

Hello, I've started a project(developer text editor) in a interpreted language(Tcl/Tk) and another with Perl(both are open-source), but with some time, when it gets in a Beta version, I will need to distribute it for the users(developers of course), but I want to know some things about this: It's possible to compile it to a executable?...