2,543 questions
1
vote
1
answer
145
views
Tkinter frame placement
I am trying to build a data visualisation app using tkinter that draws a table with a dropdown element in each record. to do this I place labels using grid and one frame. When I attempt to place ...
1
vote
1
answer
97
views
Detect key release for keyboard layouts with dead keys
in our Tcl/Tk application, we are sending key events (<KeyPress> and <KeyRelease>) over a socket to a host application which handles the actual key events.
This usually works quite well, ...
0
votes
1
answer
160
views
Why should I set the parent of a widget to the canvas when placing it as window item?
Why does the "tk-toolkit" treat the window item differently when the parent is not canvas?
When distributing events for example:
import tkinter as tk
def enter_event(event):
print(f'...
0
votes
1
answer
98
views
Get the HMENU of a tk Menu on Windows
I'd like to get the HMENU of a tk Menu for setting its background color using the SetMenuInfo function from the Windows API (setting it using configure() only affects the menu items' background, but ...
0
votes
1
answer
127
views
How do I install ruby tk for ruby 3.4.7 on Windows?
I installed the latest version of ActiveTCL and ruby 3.4.7. When I try to run gem install tk, I get the error
make failed, exit code 2
Gem files will remain installed in C:/Ruby34-x64/lib/ruby/gems/...
Best practices
0
votes
4
replies
61
views
mapi-Interface for Windows
I want to create an new email on windows using the local installed mail-client.
After some research i found "https://www.schwartzcomputer.com/tcl-tk/tcl-tk.html#MAPIMail" But this seems to ...
0
votes
1
answer
130
views
Tkinter ttk.button background is leaking color outside the button border
Button is created like:
style.configure('Dark.TButton', background=button_base, foreground=colors['text'], borderwidth=1,
bordercolor=edge, lightcolor=edge, darkcolor=edge, padding=...
0
votes
1
answer
138
views
Why does the Tkinter canvas-leave event behave differently in Windows 11 and Linux Mint?
When the cursor is moved from the green canvas into the red frame, under Windows 11 a leave-event is created, but under Linux Mint no leave-event is created.
What is the explanation for this? How can ...
Tooling
1
vote
2
replies
71
views
tcl tk: add command with multiline label
I created a menubar with several menubuttons in tcl/tk. Then I wanted to add several commands. The text ist normally short enough for one line, but there is one text which is longer. Is there any way, ...
1
vote
1
answer
117
views
Get a Tk widget's associated CGContext
I've been working on a Tk widget that uses Cairo for more complex drawings as an extension to the standard Tk functions.
I've had great success on Windows and Linux, but not so much on MacOS. I need ...
1
vote
1
answer
83
views
Connection Error To postGres from Tcl/Tk UI script
Kinda of new to Tcl/Tk, more familiar with CLI scripting. I've got a script (below) to establish a connection with a postGres DB. Once this works, I will continue efforts to create a table editor, as ...
1
vote
1
answer
195
views
ttk.Combobox selected text vanishes when focus is lost (clam theme, readonly)
I'm new to python and recently started coding a combobox using the "clam" UI theme.
However, the selected text vanishes when focus is lost from the dropdown? It seems confined to "clam&...
-1
votes
1
answer
78
views
How to disable a single menu item in Perl/Tk menubar?
The following code creates a menu list called "User Selection" with four menu items: "Save", "Save As", "Load, and "Load From":
my $userselectedmenuitems = ...
1
vote
1
answer
77
views
Tk text widget - why does deleteTextTaggedWith fail?
my $mw = MainWindow->new;
my $text = $mw->Text->pack;
$text->insert('end', 'hello world', 'mytag');
$text->deleteTextTaggedWith('mytag');
MainLoop;
The deleteTextTaggedWith causes:
...
2
votes
1
answer
90
views
Why do all Tk buttons in my script have the same command?
I am on Fedora, using Tcl9 and Tk.
Installed packages
tk.x86_64 1:9.0.0-4.fc42 fedora
tcl.x86_64 1:9.0.0-7.fc42 624cbc92582d4ecfae4c58749abde4f8
I want to create buttons that each do something ...