Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

problem defining TK() or ttk, what to uses?

I have very simple questions. Can I work with both tk() and ttk, or just one of them?' I used all the combinations and still getting the same error: NameError: name 'tkinter' is not defined. This is ...
sendog3c's user avatar
0 votes
1 answer
48 views

in strawberry perl 5.40.0.1 error when try to install TK

I am trying to install the Tk module on Strawberry Perl 5.40.0.1, but I keep getting a fatal error during the installation. Here is the procedure I used: Opened a Strawberry Perl shell. Ran the ...
marionegro's user avatar
0 votes
1 answer
30 views

Make tk_messageBox topmost

A simple question (Windows 10) .. I have short Wish script that immediately withdraws the main window and runs in the background. Upon finding a certain condition existing, pops up a tk_messageBox, ...
dana's user avatar
  • 95
0 votes
1 answer
43 views

How do I split an animated gif into its individual images in Tcl/tk 8.4 or 8.6 with pure Tcl/Tk only

I'm working on some compatibility stuff with my freeware hurricane tracker, JStrack, which has been based on Tcl/Tk 8.4 for a LONG time (didn't know 8.6 was 100% backwards compatible, so now swapping ...
GTbrewer's user avatar
  • 165
0 votes
1 answer
49 views

tcl - tk entry and text box delete

I have a small gui with a combobox, two entry widgets, .main_frame.login_data and .main_frame.password, and a text widget, .box.notes_box. There's a bind on the combobox that runs this stuff: bind ...
dana's user avatar
  • 95
0 votes
1 answer
85 views

Why do I need a empty window.attributes() to create a transparent window using tkinter (in python)?

When I create a transparent window with tkinter in python I need to start with a empty window.attributes() call.Otherwise it doesn't become transparent. Is this a bug or wanted behavior ? Example code:...
Garo's user avatar
  • 1,480
0 votes
0 answers
34 views

Error messages showed up during open a input file with pwgui software

It keep shows following message everytime i try to open a Quantum Espresso input file with PWgui software (QEs gui). ================================================== PWgui version : 7.2 - PWGUI ...
Thejan Hasaranga's user avatar
0 votes
1 answer
47 views

wait until the window is the right size before executing my function

I need to execute a function as soon as my window changes size, this function is quite consuming like this : set originalWidth 500 set originalHeight 500 bind .l <Configure> [list procConfig %W ...
Mkn's user avatar
  • 638
0 votes
0 answers
16 views

ImageTk module fails

I'm trying to use the pillow package for Python in my Visual Studio Code IDE But it seems like the ImageTk module is not working properly. Every time I run the script it tells me that there is an ...
SROCO's user avatar
  • 1
2 votes
1 answer
79 views

Perl Tk::Dialog text width not matching dialog width

I am using Perl with Tk::Dialog. I can't for the life of me work out how to set the width of the text box inside the dialog box to the width of the text it contains. Failed attempt: use strict; use ...
skeetastax's user avatar
  • 1,578
0 votes
2 answers
77 views

The button goes under the search frame, Tkinter

I trying to do a search frame, but when I added the button, It goes under the frame of the search, appears, and then disappears fast. In the search entry, when I run the code, it appears, and when I ...
mohammed's user avatar
0 votes
1 answer
29 views

Create a time chart in Ruby with Tk::Tcllib::Plotchart::Timechart

I'm going to create a time chart in Ruby with the class Tk::Tcllib::Plotchart::Timechart for a statistic data, which value is generated along with the time. However it doesn't work for me. I've tried ...
Yanxiang Chen's user avatar
1 vote
1 answer
55 views

Remove internal border inside a Text widget

Is it possible to remove the border around between the tkinter.Text widget and the background colour of a tag inside it? I set both the border width and highlightthickness to 0 but the border is still ...
TheLizzard's user avatar
  • 7,670
0 votes
0 answers
37 views

Building a class to apply styling and behavior to targeted tkinter widgets and can't get them to behave together

I wanted a button with a bit more on it's face, a fancy button, and ended up building a FancyButton class that will wrap a "surface" defined by tkinter widgets in a series of frames and ...
Thomas Miller's user avatar
0 votes
1 answer
124 views

ttkthemes doesn't theme entire window when applied to root

None of the themes I've tried in ttkthemes will theme the entire window. I apply the theme to the root/self and it will only theme text/buttons Screenshots: I was expecting the window to fill the ...
youChoose10's user avatar
1 vote
1 answer
74 views

How to add anonymous Checkboxes (or anything else) in ctkinter?

So recently I was creating an app that you can add Checkboxes to, and they were your works to do (to do list app), so I wanted to manage the Checkboxes that were added, and because they don't have ...
taha farzaneh's user avatar
-1 votes
1 answer
78 views

Why can't I make my app's screen responsive even by increasing ´self.geometry("1000x700")´?

Here's an image of the app: I'm trying to make all the options visible, however even increasing the dimensions the screen doesn't enlarge and doesn't solve the problem class App(tk.Tk): def ...
Jonh Alex's user avatar
1 vote
2 answers
67 views

Cannot remove widget after activating checkbox in Python Tkinter

I am working on my pet-project. Under the working on GUI part, I faced a problem. I want to add a new widget after clicking the checkbox the first time, and on the second click, this widget should be ...
vldrud's user avatar
  • 33
0 votes
2 answers
52 views

how is it possible that "winfo width $w" provides a width that is different from "$w cget -width" ? which one is the real width displayed?

in TCL TK I have a huge gui that I'm trying to explore. using a tcl procedure that does the exploration, I noticed that winfo and cget provides différents information for width parameter of widgets. ...
iostrym's user avatar
  • 117
0 votes
2 answers
64 views

TCL can't modify size of windows

I don't succeed to modify the size of the main windows of my TCL TK GUI : But if I type : package require BWidget MainFrame .main \ -textvariable status \ -progressvar ...
iostrym's user avatar
  • 117
1 vote
1 answer
148 views

tkinter and Scaling Factors on Linux

I am developing a cross-platform GUI using tkinter (for pydiode). I want the GUI to scale properly on 4K screens. Currently, it works well on macOS, but I'm having difficulty on Linux (Debian). The ...
Peter Story's user avatar
1 vote
0 answers
117 views

On Windws, Windows Subsystem for Linux (WSL) and every time I install Python, I get ModuleNotFoundError: No module named '_tkinter'

On Ubuntu 24.04, Here is the Error I get: [I] /home/sporty~> pyenv install 3.12.2 Downloading Python-3.12.2.tar.xz... -> https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tar.xz ...
user1135541's user avatar
  • 1,891
1 vote
1 answer
47 views

Reusing grid coordinates in perl Tk

I have an application that is reading data off a file system and dynamically creating widgets in a 3x3 grid based on the contents of the files. If I need to replace one of the widgets (or lack of) ...
Christian Dwyer's user avatar
1 vote
0 answers
58 views

using the current locale/language in a Tcl/Tk application on macOS

We are building an application in Tcl/Tk. Because of our international user base, we implemented i18n/l10n using gettext, which works nicely. Mostly. On macOS, some of the menu items are provided by ...
umläute's user avatar
  • 31.1k
2 votes
1 answer
429 views

Installing Tk on Strawberry Perl leads to compiler errors

I am running Strawberry Perl 5, version 38, subversion 0 (v5.38.0) built for MSWin32-x64-multi-thread I downloaded the latest version from CPAN (Tk-804.036) and tried perl makefile.pl but got a number ...
Orville Weyrich's user avatar
0 votes
0 answers
65 views

How can I make the background of this Python/Tk Treeview table all dark?

I'm preparing to write a user interface for a REST interface and I've never used Python/Tk before. I've written a program which shows files in the current folder for now while I figure out the look ...
Benj's user avatar
  • 32.3k
0 votes
2 answers
43 views

tcl scrollbar no more works when I remove the frames inside the canva that has the scrollbar

I use the following code to have a scrollbar that works great : (thanks : How to add a scrollbar to tcl frame) ttk::frame .frAlles # create canvas with scrollbars canvas .frAlles.c -width 400 -height ...
iostrym's user avatar
  • 117
0 votes
1 answer
39 views

in TCL/TK how to create a "blocking" windows with scrollbar that will contains a hundred of check button

I read documentation but I am still unable to guess the correct strategy because I don't find "high level" documentation that could help so I reuse stuff without knowing if it is the ...
iostrym's user avatar
  • 117
0 votes
1 answer
114 views

TCL / TK script

I want to run the script .tcl in the terminal. I downloaded TCL from and I checked it with the line below, at which a window appears as in the photo. % C:\ActiveTcl\bin\wish The script starts with ...
den251's user avatar
  • 13
2 votes
0 answers
69 views

Tkinter event loop can't process some key combinations when use <KeyPress> event

Here is the code from another question, which demonstrates the problem very well (I just found it when I was looking for solution for my problem). So, when you press some specific key combination, the ...
Mika's user avatar
  • 179
0 votes
1 answer
78 views

Getting actual dimensions of label tcl/tk widget

I try to display some data stored in array with a table-like view. To do this, I loop through the array and retrieve relevant data into labels which are then used as "table cells". Each &...
Anton Ch's user avatar
-1 votes
1 answer
50 views

event generate all - ends in "_tkinter.TclError: bad window name/identifier all"

So while I didn't found a hint in the docs that event generate all <<Custom>> should work. I'm a bit surprised it doesn't. Everything connected to events is handled by bindtags and widgets ...
Thingamabobs's user avatar
  • 7,999
2 votes
1 answer
115 views

Tcl/TK: how to prevent screen tearing?

I am messing around with canvases in TK, and have this small example of a black rectangle that follows the cursor: package require Tk package require Thread ttk::frame .c canvas .c.card .c.card create ...
user3519580's user avatar
0 votes
1 answer
51 views

I want to update a Frame/push a variable of an image to a existing Frame but it doesn't update

import cv2 as cv import tkinter as tk from tkinter import ttk from MakeImageList import * from PIL import Image,ImageTk class mainFrameClass(tk.Tk): def __init__(self,*args, **kwargs) : ...
Captn03's user avatar
-1 votes
1 answer
30 views

How do I calculate the rectangles of the window decoration / taskbar / titlebar in tkinter

Many questions on this site asking about the height of the titlebar or the taskbar in tkinter. Often is the answer simply no or there are platform specific calls to the window-manager. So this ...
Thingamabobs's user avatar
  • 7,999
0 votes
1 answer
227 views

how can i work with grids and layouts in tkinter and ctk

so i was learning the ctk module and reached a dead end i searched so much for this and i didnt get a awnser heres my question: how can i stick the search button to the entry and make other things ...
taha farzaneh's user avatar
0 votes
0 answers
28 views

ttk::progressbar can't be disabled?

Testing this ( 8.6.11 - Win7 32 ) package require Tk set p [ttk::progressbar .progreso -orient horizontal -mode indeterminate ] set b [ttk::button .botonc -text "Disable bar ?" -command {$p ...
L. Alejandro M.'s user avatar
0 votes
2 answers
79 views

How do I change the background color of the non-completed part of ttk::progressBar

I am using base Tk widgets which take the default colors of X11 (old-style). However, I want to also use ttk::progressBar. I am trying to have the widget have a certain background color. I know I can ...
M.E.'s user avatar
  • 5,466
0 votes
1 answer
144 views

How to align labels to the left and allow resizing in TCL/TK

I want to vertically stack a set of labels, and I would like them to be aligned to the left. I have tried this: #!/usr/bin/env tclsh package require Tk # Initialize global counter set widgetCounter ...
M.E.'s user avatar
  • 5,466
1 vote
1 answer
131 views

Tk_PhotoPutBlock does not render my svg file correctly

I'm trying to implement this example written in C with C Tk API. My objective is to try to use this library to transform an svg file into a photo Tk to be read in frame Tk. Below is my svg file : <...
n.robert's user avatar
0 votes
2 answers
79 views

Why do ttk widgets cause Tcl/Tk programs to read /etc/passwd and /etc/nsswitch.conf?

Below is a simple Tcl/Tk GUI program that opens a window and displays the word "Hello" in the window. The filename of the script is "hello.tk". #!/bin/sh # The next line is ...
Flux's user avatar
  • 10.9k
2 votes
0 answers
81 views

Get length of line on tkinter.canvas in inches (Mac OS)

I'm currently running Mac OS Sonoma 14.2.1 and I'm trying to set up a tkinter canvas which is scaled to "actual" real-life size. I.e., if I draw a line between any two points on the canvas, ...
JRiggles's user avatar
  • 6,623
0 votes
1 answer
123 views

how to toggle different buttons with same function on CustomTkinter

I'm trying to create a grid of buttons that toogle or at least change once pressed. But I couldn't manage to diferenciate each button to change their parameters through self.button.config() Or even ...
elavec's user avatar
  • 3
0 votes
0 answers
100 views

How to get the tk/tcl libraries and .h files (win)

I want to use the C++/Tk library for a project.(https://cpptk.sourceforge.net/index.html) I managed to setup the boost library but I still need the tcl and tk libraries and tcl.h and tk.h for it. (...
Tedyred's user avatar
0 votes
1 answer
50 views

Switching between Class Frames Tkinter

Main/Parent Class class tkinterApp(tk.Tk): #Root Window def __init__(self): #main set up super().__init__() self.geometry("700x700") self.title('Wuiz') ...
user14232195's user avatar
0 votes
2 answers
55 views

My buttons keep having white borders, how do I fix this?

This is my code. Whenever I click and hold on a button, the border is always white. Does anyone know why? This is also python 11.6. class WelcomeScreen(tk.Frame): def __init__(self, master): ...
Dark 303's user avatar
2 votes
1 answer
156 views

nodgui and SBCL(?): How to avoid the type error "The value NIL is not of type STREAM when binding STREAM" right from the beginning?

Always when I start to try packages for Common Lisp GUI programming I encounter problems at a very early stage. I'm using SBCL 2.1.1 and 2.3.8 with Debian "Bullseye" and currently, I want to ...
Demihm Seinname's user avatar
0 votes
1 answer
126 views

How can I bind right-mouse-click event to proc in Tcl?

I am working on linux based gui-tool. I have the code below. (tcl script) proc Kuser {} { echo "AAA" } proc getxy_of_mouse_pointer {} { gui_mouse_tool -window Layout.1 -start ...
Cha Cha's user avatar
  • 17
0 votes
1 answer
66 views

How can I copy and paste variable in tcl into vi-editor using middle mousewheel click?

[proc_selProc.tcl] proc selProc {str offset count} { return [string range $str $offset [expr {$offset + $count -1}]] } set myVar Hello selection handle -selection . [list selproc $myVar] selection ...
Cha Cha's user avatar
  • 17
0 votes
2 answers
115 views

tk.TopLevel is making two windows appear, but why?

The code below generates my main program (frmMain), which sometimes opens forms. But each time I open a form, the code below makes TWO forms open, the proper form, and one extra one, which is blank. ...
Vexen Crabtree's user avatar

1
2 3 4 5
51