window

Tkinter search bar [closed]

社会主义新天地 提交于 2019-12-20 07:53:28
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 days ago . Good day house. Please I want help on how to place a search box on my tkinter application toplevel so that my users can search for anything on each page. Here is my sample code (edited). import tkinter frame = tkinter.Tk() e1 = tkinter.Entry(frame) e1.grid(column=0, row=0) def text(): text = l.get()

Move a window by clicking an internal widget instead of title bar

心已入冬 提交于 2019-12-20 07:26:27
问题 In Windows when I create a QMainWindow I can move it around the screen by clicking the title bar and dragging it. In my application I've hidden the title bar by using setWindowFlags(Qt::CustomizeWindowHint) and I'm trying to build a custom title bar using a widget and setting it in the menu space with setMenuWidget(myWidget) . Now I want to reproduce the original behaviour: I want to click on my MyWidget widget inside the QMainWindow and, while mouse is pressed, dragging the mouse moves the

Unclosable window using tkinter

自作多情 提交于 2019-12-20 05:43:09
问题 Hey I am making a program that take a picture using my webcam when I type the wrong password. The program will be open and I want it unclosable. I need to know how to make a window unclosable using tkinter. 回答1: You can try all of the many things @abarnert suggested, but I think the easiest way would be to just ignore the close event. From this question: Here you have a concrete example: import Tkinter as tk import tkMessageBox as messagebox root = tk.Tk() def on_closing(): if messagebox

Interaction between UserControl and Windows

荒凉一梦 提交于 2019-12-20 04:53:18
问题 I've created a UserControl which contains some conrols (buttons and checkboxes). After that I added a reference to that UserControl in my WPF Windows. What I want to do is : when I click in a button in the UserControl this button fires an action and change something in the Windows (Textbox1.Text = "something"). My problem is that I can't access to controls inside the Windows from the UserControl. Any help please ? EDIT : Added code sample <s:SurfaceWindow x:Class="Project.Temp.MainSurface"

Interaction between UserControl and Windows

眉间皱痕 提交于 2019-12-20 04:53:08
问题 I've created a UserControl which contains some conrols (buttons and checkboxes). After that I added a reference to that UserControl in my WPF Windows. What I want to do is : when I click in a button in the UserControl this button fires an action and change something in the Windows (Textbox1.Text = "something"). My problem is that I can't access to controls inside the Windows from the UserControl. Any help please ? EDIT : Added code sample <s:SurfaceWindow x:Class="Project.Temp.MainSurface"

Difference between windowActivated and windowFocusGained

人走茶凉 提交于 2019-12-20 04:26:05
问题 What's the main difference between the method windowActivated (implemented from WindowListener) and windowGainedFocus (implemented from WindowFocusListener)? The Java documentaion says: windowGainedFocus: Invoked when the Window is set to be the focused Window, which means that the Window, or one of its subcomponents, will receive keyboard events. windowActivated: Invoked when the Window is set to be the active Window. Only a Frame or a Dialog can be the active Window. The native windowing

How to detect when a process/ thread is waiting for user input

假如想象 提交于 2019-12-20 04:22:59
问题 Is there a way to detect when a windows process is waiting for user input. For instance, when you click on a particular program it loads, in this case the program's process is probably in loading state rite? what happens when the program is fully loaded and is waiting for user input to procedure to next step. Is there a way to detect this? Cheers 回答1: Call WaitForInputIdle with a handle to a process. it will suspend execution until the program completes its initialization and is waiting for

How to Trick/Fool an Iframe to thinking its the TOP element in DOM

风格不统一 提交于 2019-12-20 04:16:31
问题 I've created this frame busting code, and now for fun, I want to bust it. This code appears inside an iframe page: (function() { if (window!=top) { //Bust out of iframe below: top.location.replace(location); } })(); And it busts out of the iframe. I do not want to alter this code at all, but I want a workaround code to put in the PARENT of this iframe, so that the iframe can't detect that its an iframe, thus invalidating this frame-busting code. In other words, how do I make the iframe think

XMoveWindow not Working before XMapWindow

浪子不回头ぞ 提交于 2019-12-20 04:04:37
问题 I have a window, and I'd like to be able to control where it appears. However, calling "XMoveWindow" seems to have no effect before "XMapWindow" is called. The docs don't say anything. Help? 回答1: In XtCreateWindow there are x and y coordinates, so you could specify the location when creating it. Note that the X server doesn't have to know about a window before it is mapped for the first time, thus moving a window which is unmapped may not have any effect. But XtCreateWindow only works for

Insert a Script into a iFrame's Header, without clearing out the body of the iFrame

送分小仙女□ 提交于 2019-12-20 03:03:47
问题 I'm looking to add a script to an iFrame's header while not losing everything contained in the iFrame's body or header... here is what I have right now which does update the iFrame with the new script, but it cleans everything in the iframe out, not appends which is what I'd like. thxs! B // Find the iFrame var iframe = document.getElementById('hi-world'); // create a string to use as a new document object var val = '<scr' + 'ipt type="text/javascript" src="http://jqueryjs.googlecode.com