user-interface

Search and replace: What's the proper shortcut?

时间秒杀一切 提交于 2020-07-04 13:27:26
问题 Very simple dilemma. A user needs to be able to do a search-and-replace in a large piece of text. Code to do this is a piece of cake. No problems there. Works like a charm! Don't break your head over that. That's solved! It's a non-issue... No, problem is defining a good shortcut for this function. While I would prefer to use CTRL + R as shortcut for this functionality (and CTRL - F for finding text) I noticed that Microsoft is using CTRL - H as shortcut! (And F3 to find text, although CTRL +

Search and replace: What's the proper shortcut?

那年仲夏 提交于 2020-07-04 13:26:06
问题 Very simple dilemma. A user needs to be able to do a search-and-replace in a large piece of text. Code to do this is a piece of cake. No problems there. Works like a charm! Don't break your head over that. That's solved! It's a non-issue... No, problem is defining a good shortcut for this function. While I would prefer to use CTRL + R as shortcut for this functionality (and CTRL - F for finding text) I noticed that Microsoft is using CTRL - H as shortcut! (And F3 to find text, although CTRL +

How to get positon in TranslateAnimation?

我的梦境 提交于 2020-06-29 05:06:11
问题 How to get Position of moving view using translate animation. TranslateAnimation animation = new TranslateAnimation(0.0f, 300.0f, 0.0f, 0.0f); animation.setDuration(500); animation.setFillAfter(true); mainview.startAnimation(animation); 回答1: You need to set a new AnimationListener, before the startAnimation command. You can use Override methods of AnimationListener and please debug it for a better understanding. You need setAnimationListener before starting your animation. 来源: https:/

SGC GUI and Pygame Widget implementation

风流意气都作罢 提交于 2020-06-29 04:27:08
问题 Hi I am trying to code a simple application with Pygame. I have made various searches and found that best way to get an user input is to use a 3rd Party GUI. I have found Simple Game Code for this aim. Below, you can find my base code, it looks for the images inside same path of script and replaces them in order at screen. But I have no experience with this kind of applications. I am trying to understand from the documentation of SGC: https://github.com/codetricity/sgc/blob/master/example

How do I make a glass window?

一世执手 提交于 2020-06-29 03:56:06
问题 My goal is to create a glass window. I don't know if it has another name, but I'll try to describe precisely what I want to archive. This window would be empty (full transparency), at the foreground, and the user could click through and do his stuff like always. Like a literal glass between the screen and the user. My final goal is make that old prank where someone get surprised by a image flashing out of nowhere. I looked upon SFML, QT, Pygame, some Java things, but couldn't find a way. I

My Tkinter GUI seems visually out of focus when opened

隐身守侯 提交于 2020-06-28 09:22:15
问题 When I open my GUI, I can type in it and do stuff, but the OptionMenu and Button widgets look as if the GUI is out of focus. A picture to demonstrate what I mean: (take a look at the dropdown menus and the buttons) After I focus on a different app and then click on my GUI again, it has the right colors which should be there if it is in focus. Once again a picture so it is clearer what I mean: So my question is, does anyone know why this is happening and what I should do so that the GUI is

My Tkinter GUI seems visually out of focus when opened

纵然是瞬间 提交于 2020-06-28 09:22:10
问题 When I open my GUI, I can type in it and do stuff, but the OptionMenu and Button widgets look as if the GUI is out of focus. A picture to demonstrate what I mean: (take a look at the dropdown menus and the buttons) After I focus on a different app and then click on my GUI again, it has the right colors which should be there if it is in focus. Once again a picture so it is clearer what I mean: So my question is, does anyone know why this is happening and what I should do so that the GUI is

PySImpleGui error code AttributeError: module 'PySimpleGUI' has no attribute 'Popup'

ぐ巨炮叔叔 提交于 2020-06-28 06:01:26
问题 Just trying to make a simple window appear and I get this error code: AttributeError: module 'PySimpleGUI' has no attribute 'Popup' import PySimpleGUI as sg sg.Popup('this is my first popup') 回答1: You import 'PySimpleGUI' from the place where no 'Popup'. Probably you named your file PySimpleGUI.py (and in your file no 'Popup'). In this case rename the file... Or it might be other file with the name PySimpleGUI.py (where no 'Popup') in the directory where your file is. Python should open the

PySImpleGui error code AttributeError: module 'PySimpleGUI' has no attribute 'Popup'

做~自己de王妃 提交于 2020-06-28 06:01:20
问题 Just trying to make a simple window appear and I get this error code: AttributeError: module 'PySimpleGUI' has no attribute 'Popup' import PySimpleGUI as sg sg.Popup('this is my first popup') 回答1: You import 'PySimpleGUI' from the place where no 'Popup'. Probably you named your file PySimpleGUI.py (and in your file no 'Popup'). In this case rename the file... Or it might be other file with the name PySimpleGUI.py (where no 'Popup') in the directory where your file is. Python should open the

Putting objects onto Frames

倾然丶 夕夏残阳落幕 提交于 2020-06-28 05:47:05
问题 I am creating a simple die rolling simulation that rolls dice when a button is pressed. I didn't add the action listener yet because I have a problem with showing up an object onto my frame. I created a class that generates a dice and gets an image of the dice with the number rolled but I can't seem to add the object onto my frame. public class DieFrame extends JComponent { private static final int FRAME_WIDTH = 500; private static final int FRAME_HEIGHT = 240; private JButton rollButton;