Skip to main content

All Questions

Tagged with
0 votes
0 answers
48 views

How to control focus events in tkinter with root.overrideredirect(True)?

Details: Python 3.12.3 The tkinter <FocusOut> event should be triggered when the window looses focus. This works just fine in normal windows, but when I do root.overrideredirect(True), the ...
Ayman Al-mankkadhi's user avatar
1 vote
2 answers
33 views

How can I set the focus to an invisible button or the window itself in a QDialog (PyQt5)?

I want to have a QDialog that blocks the interaction with the MainWindow, but where initially no widget has a focus, i. e. no button has a blue border and gets pushed when hitting "Enter". I ...
jon_tea's user avatar
  • 13
0 votes
2 answers
43 views

Focus switch in TKinter widgets not working programmatically

I have TKinter app with a window with just two widgets: a Listbox and an Entry. Now, I want that whenever a user click on an item in the Listbox, the focus switch immediately to the Entry. But neither ...
angico's user avatar
  • 3
0 votes
0 answers
41 views

Is it possible to get a PyQt5 Application (On MacOS) to not accept activation/focus completely, but still be interactable?

I am currently trying to create a PyQt5 application that sends OSC messages to ETC's EOS lighting software. I have a single encoder wheel working to modify the pan values of a moving light. However, I ...
Kyelimepi's user avatar
0 votes
0 answers
53 views

Trouble With Creating A Global Hotkey To Write Out The Contents Of A Text File Without Unfocusing From Active Window

I created a very simple Python script that should read the contents of a text file and then simulate them as keypresses. import keyboard File_object = open("commandText.txt", "r") ...
Tamber Squirrel's user avatar
0 votes
1 answer
44 views

Force Tkinter widget to lose its focus

I'm not able to do this: button = ttk.Button(frame , state = DISABLED , command = lambda: a_function()) def control_s(event): if button.instate(["!disabled"]): button.focus_get()...
nastiliano's user avatar
-1 votes
1 answer
284 views

tkinter focus_set() not setting focus [duplicate]

I am trying to set focus on an entry window however I get an error throw every time. AttributeError: 'NoneType' object has no attribute 'focus_set' I looked up some examples of this and none of the ...
Devin Bowen's user avatar
0 votes
1 answer
412 views

Any python code that is not in focus runs twice as slow

Initially, I encountered this problem while learning YoloV8. At the start of training, while the window was in focus, each epoch took 7 seconds, however, after switching the window on the browser (no ...
Mikhail Kozlov's user avatar
0 votes
0 answers
44 views

Call default text selecting in Entry widget, like with pressing 'Tab'

Tkinter Entry widget has a built in option. If you have some Entry widgets in the frame, pressing Tab, when you focus_set one of the Entries, will cause switching focus between these Entry widgets and ...
MIku's user avatar
  • 89
0 votes
2 answers
416 views

Issue using focus() for Entry widgets on a multiple page Tkinter application

In my application, I have two pages that are created when the App class instance is run. Within each page, I have an Entry to which I have applied the focus() method. The Login page (Page1 class) has ...
wmiller's user avatar
  • 25
0 votes
1 answer
184 views

How can I switch the focus between toplevels of a tkinter program?

I am using key-accelerators for menu entries in a multi window program. But when an accelerator-key is pressed, then always the same window reacts to the key. As you can see in my example code, I ...
Matthias Schweikart's user avatar
0 votes
1 answer
505 views

ttk.Treeview.focus() on 1st entry in my tree-view is giving "I001" instead of 1, I need 1 so I can update entry on the tree-view using insert()

I am trying to update an entry on my tree-view. The issue I am facing is, when I click to update an entry the ttk.Treeview.focus() methods gives me 'I001' on the first entry for example and with this ...
Code-Killer's user avatar
0 votes
1 answer
101 views

Can a Gtk.Entry (part of a Gtk.SpinButton) "have-focus" if it's in a Gtk.Menu?

I'm making an application that can change certain parameters through a Gtk.Menu. I have a Gtk.MenuButton that pops down a Gtk.Menu with other submenus in it. One of those submenus has Gtk.MenuItems ...
abinitio's user avatar
0 votes
0 answers
26 views

Where do I make a mistake with this tkinter focus?

I made a tool to add multiple order numbers in our system. The first time a row of entry cells is placed the focus is where it should be. But the second time the focus is not in the new left cell. ...
Pascal's user avatar
  • 43
0 votes
1 answer
459 views

PyQt5: change the focus border color of a QLineEdit

The selected area changes the color of the border, as shown in the image above. Is there a way to change the color that changes?
tt APX's user avatar
  • 137

15 30 50 per page
1
2 3 4 5
10