window

Tkinter window at the bottom all the time

Deadly 提交于 2019-12-24 08:24:51
问题 I already know tkinter.Tk().attributes("-topmost", True) which makes the window stay on top all the time. But is there some way to make the window stay at the bottom all the time? I mean something like tkinter.Tk().attributes("-bottommost", True) or something like that. 回答1: No, there is no method in tkinter that forces the window to be below all other windows on the desktop. 回答2: There is not strictly a way to make a Tk window always underneath others. If your aim is to have a Tk application

Hide JDialog window when the window lost focus

梦想与她 提交于 2019-12-24 07:29:03
问题 Hi I have only one JDialog box in my Java application.I want to make it invisible if it lost the focus. I've tried different method, But didn't able to trigger any of the window focus events. Here is my code: public void windowGainedFocus(WindowEvent e) { System.out.println("gained focus"); } public void windowLostFocus(WindowEvent e) { System.out.println("lost focus"); } 回答1: Responding to Focus events can be really tricky. My experience has been that pretty much any time someone has

Can I redraw a custom NSView while another control on the same window is being used?

梦想与她 提交于 2019-12-24 07:06:21
问题 In a program I am working on I am performing a large amount of data crunching, and want to be able draw a custom NSView to represent the process visually. The data crunching is processed off the main thread by using GCD (using dispatch_sync as the order needs to be preserved): for (int i=0; i<iterations; i++) { dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // Add a data crunching task to the queue! }); } When the processing is started I initialise a timer,

Get WPF Window class name. C#

不问归期 提交于 2019-12-24 06:49:08
问题 I need to get string value from WPF Window class? For example I have an instance of MainWorkspace window class, and I want to get this "MainWorkspace" string. How to do this? 回答1: string name = theWindow.GetType().Name; 来源: https://stackoverflow.com/questions/8398816/get-wpf-window-class-name-c-sharp

Nuxtjs with scrollmagic gives me “window is not defined”

自作多情 提交于 2019-12-24 06:20:42
问题 I want to use scrollmagic with nuxtjs. I installed scrollmagic via npm. npm install scrollmagic In my nuxt.config.js file i added build: { vendor: ['scrollmagic'] }, And in my pages/index.vue file i simply imported it. import ScrollMagic from 'scrollmagic' But this results only in this error [vue-router] Failed to resolve async component default: ReferenceError: window is not defined [vue-router] uncaught error during route navigation: ReferenceError: window is not defined at C:\pathto\node

How do I remove the title bar with tkinter on linux LXDE without overrideredirect or attributes?

时光总嘲笑我的痴心妄想 提交于 2019-12-24 05:55:08
问题 [my previous post was closed stating it was a duplicate but I still do not have an answer] I am trying to create a window without a title bar that has buttons on it. These buttons would open/run certain programs (open web browser, reboot computer, etc). I want this window to remain on the screen always and not able to be closed (like a kiosk with buttons on the screen). On windows, I am able to make this work fine with overrideredirect(True) and attributes("-topmost", True). However, when I

Is it possible for 2 windows managed by Windows to have the same window handle value?

↘锁芯ラ 提交于 2019-12-24 04:14:04
问题 Is it possible for 2 windows managed by Windows to have the same window handle value? Consider both cases when these 2 windows are opened by the same process and when these 2 windows are opened by 2 different processes. 回答1: Quick answer: no, it's not possible if they are inside the same desktop, every window handle issued by the window manager is unique (inside its desktop) throughout all the existence of the window, otherwise it couldn't uniquely identify such window on the system current

Use animation to change window size in WPF

∥☆過路亽.° 提交于 2019-12-24 02:50:08
问题 I am looking a way to animate the resizing of a window, lets say that I have a window with Height=300 and Width=300, I have 2 buttons, when I click the first button the window size must change to Height=600 and Width=600 and when I click the other button the window size must back to the original size, well I can do this simply changing the Height and Width properties, but I would like to use something like Storyboard - DoubleAnimation to give the impression that the window size is changing

Non-resizeable, bordered WPF Windows with WindowStyle=None

瘦欲@ 提交于 2019-12-24 02:35:08
问题 Basically, I need a window to look like the following image: http://screenshots.thex9.net/2010-05-31_2132.png (Is NOT resizeable, yet retains the glass border) I've managed to get it working with Windows Forms, but I need to be using WPF. To get it working in Windows Forms, I used the following code: protected override void WndProc(ref Message m) { if (m.Msg == 0x84 /* WM_NCHITTEST */) { m.Result = (IntPtr)1; return; } base.WndProc(ref m); } This does exactly what I want it to, but I can't

Dim background of an activity

给你一囗甜甜゛ 提交于 2019-12-24 01:55:35
问题 I am trying to show an activity as a floating window with a dimmed background and I'm using the following code to do that, which is taken from the Google I/O 2016 project: protected void setupFloatingWindow(int width, int height, int alpha, float dim) { WindowManager.LayoutParams params = getWindow().getAttributes(); params.width = getResources().getDimensionPixelSize(width); params.height = getResources().getDimensionPixelSize(height); params.alpha = alpha; params.dimAmount = dim; params