focus

When does the *Window focus* change in Android?

人走茶凉 提交于 2019-12-21 09:15:53
问题 In my project, I need to catch the Window focus change. I have logged out the results for all the stages of an activity. When the screen is on, the result is as follows: 02-17 13:50:03.898: DEBUG/InquiryInterface(3829): onCreate screen state : false 02-17 13:50:03.898: DEBUG/InquiryInterface(3829): onStart screen state : false 02-17 13:50:03.898: DEBUG/InquiryInterface(3829): onResume screen state : false 02-17 13:50:08.998: DEBUG/InquiryInterface(3829): onPause screen state : true 02-17 13

Tab on disabled input

丶灬走出姿态 提交于 2019-12-21 07:37:48
问题 I am implementing progressive UI disclosure pattern in my application. Using which I am disabling the next elements. So based on input of one element the next element is enabled. But I have a problem is since the next element is disabled, the tab from the current element is taking the focus to the end of document or the tab header when tab out. As the progressive enables the element after the tab out, while this was happening the next element was not enabled so tab was lost outside the

Use JSpinner like JTable cell editor

蓝咒 提交于 2019-12-21 05:40:59
问题 i'm using a JSpinner like a table cell editor, i have one annoying problem: The cell remains in NON-editable mode until i click into it, for NON-editable i mean that i can't write into it(it has not focus so it doesn't accept inputs keyboard) but i can change the value with up-down arrows(of keyboard). So, what i have to do to focus my table cell as soon as i press a key when it is selected? Except for that problem my SpinnerEditor class works quite well. Thanks all. 回答1: Here's a complete

How do I prevent WPF buttons from remaining highlighted after being clicked?

浪子不回头ぞ 提交于 2019-12-20 16:13:13
问题 When a standard WPF button is clicked, it gets highlighted in blue (probably using the blue color from whatever Windows theme is set), and it stays highlighted until you interact with any other control. For my application, it is confusing for the user. Is there a simple way turn this off and get the button back to its normal style? I am using .NET 4. 回答1: What happens is that the button accepts the input focus after it has been clicked, just like any other control does when you click on it.

How do I prevent WPF buttons from remaining highlighted after being clicked?

一曲冷凌霜 提交于 2019-12-20 16:12:12
问题 When a standard WPF button is clicked, it gets highlighted in blue (probably using the blue color from whatever Windows theme is set), and it stays highlighted until you interact with any other control. For my application, it is confusing for the user. Is there a simple way turn this off and get the button back to its normal style? I am using .NET 4. 回答1: What happens is that the button accepts the input focus after it has been clicked, just like any other control does when you click on it.

WPF how to make textbox lose focus after hitting enter

耗尽温柔 提交于 2019-12-20 12:35:18
问题 I created some textboxes and I want user to enter decimal values into them. In every application I have ever used, when I type something into the textbox and hit enter, the value is accepted and textbox lose focus. How can I do it in my app? I know it should be relatively easy to do it with a key event, but maybe there is a command or something. I searched the stackoverflow but I only found questions about how to keep focus after hitting enter... 回答1: You can also create a generic behavior

Keyboard.Focus does not work on text box in WPF

半城伤御伤魂 提交于 2019-12-20 09:48:19
问题 I am banging my head on what looks like such a simple problem to fix in wpf but i have yet to discover why i can't get my app to behave according to my plan. I have a small search box that pops-up in my wpf application when user presses ctrl+f. All i want is for the caret to be flashing inside the search box text box, ready to take whatever user input without the user having to click on it. Here is the xaml code for the text box which is visible, enabled, hit testable, tabstopable and

Enter key does not trigger IDOK Default Push Button action

匆匆过客 提交于 2019-12-20 04:57:07
问题 I have a CDialog derived class. Its interface definition has several picture boxes and some buttons after, defined in resource file as: IDD_SELECT_ITEMS DIALOGEX 0, 0, 462, 274 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Select" FONT 8, "MS Shell Dlg", 0, 0, 0x0 BEGIN CONTROL "",IDC_ITEM1,"Static",SS_BLACKFRAME,13,18,59,52 //... CONTROL "",IDC_ITEM18,"Static",SS_BLACKFRAME,373,178,59,52 LTEXT "Select",IDC_STATIC,7,256,40,8 PUSHBUTTON "All",IDC

How to focus menuBar() with Qt

白昼怎懂夜的黑 提交于 2019-12-20 03:30:11
问题 I have a working application. I added a menuBar() to the main window with some menus. Then, I hid it to free screen space. I wrote the code below so that when user presses ALT key, the menu bar appears if it's hidden, and it hides if it's displayed. void MainWindow::keyPressEvent( QKeyEvent *k ) { if(k->modifiers() & Qt::AltModifier) { menuBar()->setHidden(!menuBar()->isHidden()); if(menuBar()->hasFocus()) { QMessageBox::information(this, "Info", "Focus !"); } } } As you can see, I also added

Focus lost on partial postback with UserControls inside UpdatePanel

妖精的绣舞 提交于 2019-12-20 03:08:37
问题 I have a bunch of user controls on a form inside an AJAX UpdatePanel, containing a couple of controls including a TextBox. Each of these usercontrols makes up a field on a data entry form. Some of the fields have AutoPostBack turned on and fire an event which updates the value in another form field server-side. However, when the partial postback returns and the calculated field is updated, the form focus is lost - the first field on the form gets focus back. Therefore the form is pretty