focus

.Net Toolstrip/MenuStrip Focus Issues

和自甴很熟 提交于 2019-12-24 02:08:24
问题 No matter what the scenario may be I'm able to recreate this annoying problem 100% of the time. Create a .Net project, C# or VB.Net. Add a ToolStrip control to the form. Create a few simple DropDownButton(s) that contain at least 2 menu items. Add any other controls you wish, a list box (populate it so it can receive focus correctly) and a ComboBox control. Either assign shortcut keys or enable TabStop on the ToolStrip so that it can receive focus by Keyboard. Run the project (Debug/Release,

Java Key Event won't execute once I press a button

走远了吗. 提交于 2019-12-24 02:04:00
问题 Hi hope someone can tell me what I am doing wrong with my Key Event. I am using a Card Layout to navigate through two of my JPanels atm. To do so I use Action Events as well as Key Events. The action events will toggle between JPanels when a button is pressed while the key events will hide away the buttons when a key is pressed. All good with the key events, it does what I want (call a method on one of the panels to set the bounds of the buttons placed inside it eq: button.setBounds(-1, -1,

Java Key Event won't execute once I press a button

↘锁芯ラ 提交于 2019-12-24 02:03:43
问题 Hi hope someone can tell me what I am doing wrong with my Key Event. I am using a Card Layout to navigate through two of my JPanels atm. To do so I use Action Events as well as Key Events. The action events will toggle between JPanels when a button is pressed while the key events will hide away the buttons when a key is pressed. All good with the key events, it does what I want (call a method on one of the panels to set the bounds of the buttons placed inside it eq: button.setBounds(-1, -1,

Java - how do I gain focus on JTextArea when selecting a new JTabbedPane

荒凉一梦 提交于 2019-12-24 01:49:07
问题 I have a swing GUI with multiple JTabbedPane s; each tab contains two JButtons at the top, then a JTextArea (for user input), and a JTextField at the bottom for a result. My problem is that I can't get the JTextArea to gain focus after switching tabs without either clicking in it with the mouse or using the tab key on the keyboard? I have... frame.addWindowFocusListener(new WindowAdapter() { public void windowGainedFocus(WindowEvent e) { textArea_1.requestFocusInWindow(); ...and this works

Qt4 no focus loss on clicking menubar

删除回忆录丶 提交于 2019-12-24 01:08:21
问题 I have a pyqt application where I have two QLineEdit fields which get data from a QDataWidgetMapper. I can edit the text in the fields and the change is commit on focus loss when I e.g. click in the other unselected field. But if I edit the text and then click on the menubar and there on e.g. save, I won't have a focus loss and therefore my last entered data never reaches the model. How can I get a focus loss on clicking on the menubar? 回答1: For me, connecting to the QLineEdit.editingFinished

Keyboard not shown on inflated editText even after clicking on it

不想你离开。 提交于 2019-12-24 00:58:47
问题 Background I have a form-like activity, which has some views that can be created dynamically upon pressing. I'm using an xml for each field that is inflated upon clicking on a button. What I need is that upon choosing to add a new item, it will get focus, scroll if needed, and show the keyboard so that the user can type things into it. The keyboard may be shown upon adding the field or when clicking on the EditText. The problem For some reason, on some devices (and I don't think it's even an

Android EditText change focus after validation and showing the error in a Dialog

谁说胖子不能爱 提交于 2019-12-24 00:39:05
问题 I have a simple Activity with 3 EditText fields. User, Pass, Confirmation After typing something in the User field and the person clicks next on the keyboard, I have a setOnFocusChangeListener on there that will validate the input. If the validation fails a Dialog opens with a message and an OK button. After the Dialog is closed I tried a requestFocus on my User EditText in many variations, by releasing it on Pass, by trying to release on User again, by requesting than clearing and requesting

Form lost focus - Basic Question

安稳与你 提交于 2019-12-23 22:27:44
问题 I have C# windows form application, with all default settings. I am using VS 2008, OS - Windows VIsta. When my form loses focus, (as in when a user clicks on something behind the form), i need the same form that lost focus to regain it. I made use of this Event to handle this; private void Form1_Deactivate_1(object sender, EventArgs e) { Console.WriteLine("DEACTIVATE EVENT _______+++++++++_________"); Form1 f = new Form1(); f.show(); } Here, what you will see is that is when the form loses

focus goto on next box after enter character in first box

不羁的心 提交于 2019-12-23 22:24:06
问题 I have to implement an application in which I have set small edittext for input PIN number and Mobile Number. Each edit text contain 1 character at a time. Now when I run this app, I found that for each box I need to give focus to each edittext . So in this case is it possible to set focus in next edittext after character is entered in first and then goto third after character is entered in second. so please help me out this Here is layout image. 回答1: 1. implements TextWatcher on EditTexts

Detecting Focus on (frame + components) in swing

风流意气都作罢 提交于 2019-12-23 21:04:41
问题 I have a small dialog frame that appears, and within this frame are a series of buttons and a textbox. I need the frame to be able to detect when the user has put focus on something else on the screen (being: anything besides the frame and its components), so I can close down the frame. Any advice on how to go about this? I've been trying at focus solutions for hours, to no solution! 回答1: need the frame to be able to detect when the user has put focus on something else on the screen Use a