events

why can i not use ctrl + v with a virtual event tkinter text widget python

why can i not use ctrl + v with a virtual event tkinter text widget python Question: i use a tkinter text widget and i have copied the script in this answer to bind a event for every change the text widget. the code for the text widget: """I found this script here: https://stackoverflow.com/questions/40617515/python-tkinter-text-modified-callback""" import …

Total answers: 1

How could I use my defined function as an argument to activate another function?

How could I use my defined function as an argument to activate another function? Question: What I am trying to do is to set the button status to DISABLED whenever the textbox is empty. I recreated a snippet of my code bellow: import tkinter from tkinter import * root = tkinter.Tk() textbox = tkinter.Text(root, height=4) …

Total answers: 2

PySide6 QCheckBox stateChanged() generates state event int instead of Qt.CheckState

PySide6 QCheckBox stateChanged() generates state event int instead of Qt.CheckState Question: PySide6 6.4.1 PIP on Ubuntu and Windows contains a QCheckBox with stateChanged() API call to generate an event when the checkbox state changes. QCheckBox documentation: state contains the checkbox’s new CheckState. PySide6.QtCore.Qt.CheckState documentation: This enum describes the state… Qt.Checked: The item is checked.. The …

Total answers: 2

How to cancel a tkinter key bind event

How to cancel a tkinter key bind event Question: I have a tkinter treeview. I am responding to a click on an item. If the item is not unique i want to cancel the selection and stay on the current item. The code I am using is: def select_item(self, event, *args) -> None: item = …

Total answers: 1

Can opcua client trigger events to server in Python?

Can opcua client trigger events to server in Python? Question: i have an issue with the design of my server-client opcua framework. The thing is, from client i want to send a event notification to opcuaServer. Is this possible? Until now i can send event triggers from server, but i dont know if client is …

Total answers: 2

how to exit a function when an event is set?

how to exit a function when an event is set? Question: I have an infinite loop thread that sets an event when a sensor is high/true event = threading.Event() def eventSetter(): while True: if sensor: event.set() else: event.clear() th1 = threading.thread(target=eventSetter) th1.start and I have a function capture that takes 5 sec to execute def …

Total answers: 2

QtWdgets how to make a line dependent on the mouse

QtWdgets how to make a line dependent on the mouse Question: I want to achieve the follwing in QtWidjets. I have a line that moves with the mouse but I want it to move only when clicking (and holding the click) on the actual line; when there is no left click on the mouse nothing …

Total answers: 1

count if event occurs per city

count if event occurs per city Question: I am trying to count how often an event occurs before another event occurs per city. To be more specific I am trying to count how often event number 21 occurrs before 2, and the other way around. The dataset looks like this import pandas as pd data …

Total answers: 3

How to register two click events in a row on the same marker

How to register two click events in a row on the same marker Question: In a Dash app, I would like to toggle the values of a boolean array when markers in a scatterplot are clicked. If I click the same marker twice in a row, I would like to toggle that value twice, but …

Total answers: 1

Tkinter Radiobutton Virtual "Click" (event)

Tkinter Radiobutton Virtual "Click" (event) Question: I’m crazy searching for doing this for days and days… I need to simulate a virtual click on a Tkinter RadioButton. In other words. Just when my application starts I need some virtual click event on a radiobutton to force a code execution. I would need my radiobutton in …

Total answers: 2