window

Make tkinter text widget fit to window

徘徊边缘 提交于 2019-12-24 13:18:59
问题 I'm making a text editor whose main widget is a Text widget for the user to actually enter text. I need to make the text widget fit to the window when the user resizes the pane. I kind of cheated by making the widget huge, but that's just a makeshift solution to let me work on other parts while I look for a solution. How can I make the Text widget automatically resize to fit the window? 回答1: Use pack to place the widget, with expand set to True and fill set to BOTH . Ex: from tkinter import *

Python: Tkinter: How to change the windows border color?

南笙酒味 提交于 2019-12-24 12:19:25
问题 Every result I've gotten from searching this question up has to do with changing the border color for Tkinter widget's WITHIN the main app window, or changing the background color and stuff. What I'm looking to do is actually change the windows border color itself. Which I have marked in this picture here I read some stuff concerning 'Styles' but it didn't seem to be what I was looking for. Can anyone help point me to a tutorial for changing this, or explain how it can be done? Or if there is

WPF Page refresh

∥☆過路亽.° 提交于 2019-12-24 11:43:47
问题 1.How to close or cancel the pop up window in Button click.? When i update the data in pop up window, the same time how to refresh the datagrid in main page.? 回答1: Close a popup by optionally setting DialogResult to true/false and then calling Close(). You can set the IsDefault or IsCancel property on a button to automatically set the result & close. You need to provide more information for your datagrid question. 来源: https://stackoverflow.com/questions/781250/wpf-page-refresh

window.open: is it possible open a new window with modify its DOM

我的梦境 提交于 2019-12-24 11:19:14
问题 I want open a new window: var my = window.open('iframe.html', '_blank' ,"height=600, width=600"); but just when open it, I want modify its DOM, I have tried: var div = my.document.createElement("div"); div.innerHTML = "Hello!"; my.document.body.appendChild( div ); or: var div = $('<div>Hello World</div>'); $(my).contents().find('body').append(div); Both of them doesn't work; So is it possible modify my iframe DOM when I open it? 回答1: It is possible to access and modify the iframe DOM only

How to focus on a previously opened window using window.open()

北慕城南 提交于 2019-12-24 10:07:58
问题 I would like to open a popup window for a website and keep it for a music player to be able to play seamless music while the user is navigating across pages. What I would like to achieve is that when the user first clicks the "Music" button a new popup window opens using window.open (done). The second part would be that when the user navigates to other pages and clicks again on the "Music" button then the already open window receives the focus but doesn't load again. However what is happening

Install window service within wpf application

自古美人都是妖i 提交于 2019-12-24 09:58:58
问题 I have two projects wpf and window service. I have created setup for wpf project. I want to install window service withing wpf project setup i.e once user install wpf project, window service will install automatically. Is it possible. Please suggest. Thanks 来源: https://stackoverflow.com/questions/51048380/install-window-service-within-wpf-application

Setting the default location for opening windows in an Xvfb environment

一笑奈何 提交于 2019-12-24 09:26:09
问题 This problem is driving me crazy. Maybe the experts at Stack Overflow can help. I want to open an application in Xvfb and to have it always positioned at x,y=0,0 (Top left corner). The application does not take any parameters, allowing it to reposition the opened window itself. Is there a way to set the default window position in a X-server? (Xvfb). Best regards Gustaf 回答1: I use Xvfb with twm (yum install twm). You need to create a ~/.twmrc file to indicate how windows are displayed. I just

window.print() works on urls except one

丶灬走出姿态 提交于 2019-12-24 09:24:45
问题 What is the difference between these links(iframe src)? window.print() works on var myWindow=window.open('','','fullscreen=yes'); myWindow.document.write("<iframe src=\"http://stackoverflow.com/questions/11447382/window-print-does-not-take-the-current-url\" width=\"100%\" height=\"100%\"></iframe>"); myWindow.document.write('<iframe src="' + url + '" width="100%" height="100%"></iframe>');myWindow.document.close(); myWindow.focus(); myWindow.print(); But not works on myWindow.document.write("

window.location force to update?

孤街醉人 提交于 2019-12-24 09:12:57
问题 I'm wondering is there a way for force window.location to update? I'm on a page which uses ajax to generate results. However, the URL stays the same in the bar and so I can't grab the real URL. I'm wondering.. how would I grab the URL? can I force window.location to update without refreshing the page? An example of the sort of page I'm talking about is google instant! 回答1: Are you looking to update the content and URL with AJAX? Just use History API provided by HTML5 browsers. 回答2: No you can

javascript to launch only ONE window for a Java applet with a given URL

自作多情 提交于 2019-12-24 08:46:33
问题 I need a javascript solution to launch only one window, with a Java Applet in it, for a given URL. I found a solution posted here on Stack Overflow - here: JavaScript window.open only if the window does not already exist But it doesn't seem to work .. I get Error: launchApplication.winrefs is undefined Line: 29 I can't seem to post the code in this little box and make it look right below, so the code (my working code, plus the solution from above) is here: http://pastie.org/833879 Where is