user-interface

Best way to debug a GUI application (particularly in Python)?

六眼飞鱼酱① 提交于 2021-01-28 22:16:36
问题 So I'm trying to debug this source code (in Python) that I didn't write that has a GUI (Kivy in particular, and I'm trying to figure out what code/event is being triggered when I click on certain things. I try to put in breakpoints for where I think it's going to be triggered, I sometimes find that I'm wrong, and the breakpoint doesn't seem to ever be encountered for what I want. Anyone have any advice for GUI debugging, and figuring out what is being triggered by certain events, especially

powershell populate combobox basing on the selected item on another combobox

本小妞迷上赌 提交于 2021-01-28 20:27:59
问题 This time I am stuck with another PowerShell GUI challenge. I have a Form that contains two different comboboxes (combobox1 and combobox2) What I want to do is: The first combobox to show a list of all the clients that I have and the second combobox to show all the different mailboxes that are available for the client that has been selected on the first combobox. Once again I don't know how to do it so I am asking you guys for advise. I managed to show a list of all the clients on the first

How can I update Entry without a “submit” button in Tkinter?

混江龙づ霸主 提交于 2021-01-28 19:34:49
问题 So I have Entries which have some values assigned to them from a CFG File. I want to modify the CFG file when the Entry is updated, live, without a submit button; Using <Key> binding will work but will take only the previous value, not the current one, as the last key pressed is not taken into consideration as a value, but as a key-press . For example: class EntryBox: def __init__(self, value, option, section, grid_row, master_e): self.section = section self.option = option self.box = Entry

Remove accents from a text file

岁酱吖の 提交于 2021-01-28 18:30:45
问题 I have issues with removing accents from a text file program replaces characters with diacritics to ? Here is my code: private void button3_Click(object sender, EventArgs e) { if (radioButton3.Checked) { byte[] tmp; tmp = System.Text.Encoding.GetEncoding("ISO-8859-1").GetBytes(richTextBox1.Text); richTextBox2.Text = System.Text.Encoding.UTF8.GetString(tmp); } } 回答1: richTextBox1.Text = "včľťšľžšžščýščýťčáčáčťáčáťýčťž"; string text1 = richTextBox1.Text.Normalize(NormalizationForm.FormD);

How to display the contents in an array by using mouseListener?

那年仲夏 提交于 2021-01-28 13:31:33
问题 I'm doing a program in which there are 8 shapes contained in an array that will be displayed when you click the mouse. I am new to Java and not that familiar with event handlers and listeners. I am trying to make the shapes appear at the location the mouse is clicked at inside the frame yet I am having trouble since the constructor of each shape use 2 Points as its parameter. Here's an example from the code: import MyLibs.Circle; import MyLibs.Rectangle; import MyLibs.Shape; import java.awt

Unity3D: How to detect when a button is being held down and released [duplicate]

南楼画角 提交于 2021-01-28 12:24:44
问题 This question already has answers here : How to detect click/touch events on UI and GameObjects (4 answers) Closed 1 year ago . I have a UI button. I want to show a text when the user is pressing the button and hide the text when the user releases the button. How can I do this? 回答1: You have to create your own custom button by extending Button class and override method OnPoiterDown and OnPointerUp. Attach MyButton component instead of Button to your gameobject using UnityEngine; using

Unity3D: How to detect when a button is being held down and released [duplicate]

限于喜欢 提交于 2021-01-28 12:16:30
问题 This question already has answers here : How to detect click/touch events on UI and GameObjects (4 answers) Closed 1 year ago . I have a UI button. I want to show a text when the user is pressing the button and hide the text when the user releases the button. How can I do this? 回答1: You have to create your own custom button by extending Button class and override method OnPoiterDown and OnPointerUp. Attach MyButton component instead of Button to your gameobject using UnityEngine; using

Eclipse RCP: check if a job has finished

孤街浪徒 提交于 2021-01-28 11:53:49
问题 I want to check if a Job has finished. Currently I do this: if ( traceJob.getState() != Job.WAITING && traceJob.getState() != Job.RUNNING){ But I think there should be a better way to check. Anyone has any good idea ? 回答1: You can use Job.addJobChangeListener to add a listener to a Job. The done method of the listener is called when the job finishes. There is a JobChangeAdapter class with default implementations of all the IJobChangeListener methods so that you don't need to implement all of

<No main classes found>

房东的猫 提交于 2021-01-28 10:33:40
问题 Followed an oracle tutorial on creating a GUI, the tutorial promised that upon running the application I will have to select the main class, however, Netbeans doesn't find any Main classes? Here is my code: public class GUI extends javax.swing.JFrame { /** * Creates new form GUI */ public GUI() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form

<No main classes found>

亡梦爱人 提交于 2021-01-28 10:33:35
问题 Followed an oracle tutorial on creating a GUI, the tutorial promised that upon running the application I will have to select the main class, however, Netbeans doesn't find any Main classes? Here is my code: public class GUI extends javax.swing.JFrame { /** * Creates new form GUI */ public GUI() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form