focus

window.blur() not working with Firefox 4

混江龙づ霸主 提交于 2019-12-31 02:10:29
问题 I have a function that when activated opens a new window as a pop-under under the current browser window. It was working fine with all past version of IE and FF, now it has stopped working. Apparently Mozilla has changed one of the setting of FF 4 to prevent this: http://support.mozilla.com/en-US/questions/806756 Here is the code I am using: function popup(page) { var myWin = window.open(page,"mywindow","menubar=1,resizable=1,status=1,toolbar=1,location=1,directories=1,scrollbars=1"); opener

How to force a focus on a component before the Form is shown

眉间皱痕 提交于 2019-12-30 18:27:22
问题 I have to show (with showModal) a Form with many TEdit but I want to force the focus on a TEdit, but not always the same, depending on the context. I can't use SetFocus before the ShowModal (because the Form is not activate) and use the Component Name or Tag is not convenient in my application. Do you have an idea ? 回答1: The simplest way to achieve your goal, in my view, is to assign to the ActiveControl property for the form. You can do this before showing the form. When you form is later

How to force a focus on a component before the Form is shown

给你一囗甜甜゛ 提交于 2019-12-30 18:27:11
问题 I have to show (with showModal) a Form with many TEdit but I want to force the focus on a TEdit, but not always the same, depending on the context. I can't use SetFocus before the ShowModal (because the Form is not activate) and use the Component Name or Tag is not convenient in my application. Do you have an idea ? 回答1: The simplest way to achieve your goal, in my view, is to assign to the ActiveControl property for the form. You can do this before showing the form. When you form is later

how to spoof arrow keys to my activity on android

雨燕双飞 提交于 2019-12-30 12:21:38
问题 I am trying to override the volume buttons to act as Up/Down arrow keys (i.e. they should move focus around on all of my activities focus-able Views.) To do so I am overriding my activities dispatchKeyEvent() method note that I also tried onKeyDown() but some portion of my volume key events was still going thru to the system, my device has audible feedback when you change the volume. I could still hear the beep but the volume was not actually being changed. Switching to dispatchKeyEvent()

forceActiveFocus() vs focus = true in QML

荒凉一梦 提交于 2019-12-30 11:14:45
问题 I read the documentation about: focus property activeFocus property forceActiveFocus() method FocusScope object and keyboard focus in QtQuick but it is still not clear when should someone use forceActiveFocus() method over setting the focus property to true or vice versa. 回答1: As the documentation states: For very simple cases simply setting the focus property is sometimes sufficient. Such a simple case would be, if the Item which gets focus: true is not enclosed by a FocusScope that might

Flash & Flex SDK/AS3 - How to keep keyboard focus?

我的未来我决定 提交于 2019-12-30 09:54:07
问题 I'm writing a flash application in Flex/AS3, and I can't seem to assign keyboard focus to it. I was mindful of this problem early on in development and added a splash screen with a "play now" button, to entice the user to click. However, the user must then click a second time on the application for the keyboard to work! To make matters worse, I have an in-game shortcut that returns you to the main menu. If you return to the main menu then click the "play now" button, the SWF loses focus again

WPF DataGridTemplateColumn. Am I missing something?

不想你离开。 提交于 2019-12-30 09:05:13
问题 <data:DataGridTemplateColumn Header="Name"> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding Name}"> </DataTemplate> </data:DataGridTemplateColumn.CellTemplate> <data:DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <TextBox Text="{Binding Name}"> </DataTemplate> </data:DataGridTemplateColumn.CellEditingTemplate> </data:DataGridTemplateColumn> It's clear example of Template column, right? What could be wrong with that? So, here is the thing - when

Set Cursor On A JTextField

橙三吉。 提交于 2019-12-30 06:57:31
问题 I am making a small application in Java that uses a JTextField. Now, I want, as soon as I run the app, the cursor to be put automatically in that so that the user doesn't have to click on it and then write the text. I have tried pretty much everything that I found on the net: setCaretPosition(0), grabFocus(), requestFocusInWindow() or requestFocus() but none of them worked! I am desperate, can you please help me solve this? Thanks a lot 回答1: By default focus will go to the first component on

TreeView re-grabs focus on Ctrl+Click

一世执手 提交于 2019-12-30 06:57:05
问题 I have a WinForms TreeView control that I would like to use to open another form based on which node is currently selected. I want to open that other form when I Ctrl+Click on the node. Currently, it works the way I would like if I open the other form in a DoubleClick handler (and double-click on the node, obviously); however, if I use a Click (or MouseClick) handler and open the other form when the Control key is pressed, it opens the other form correctly but returns focus to the original

TreeView re-grabs focus on Ctrl+Click

浪子不回头ぞ 提交于 2019-12-30 06:57:05
问题 I have a WinForms TreeView control that I would like to use to open another form based on which node is currently selected. I want to open that other form when I Ctrl+Click on the node. Currently, it works the way I would like if I open the other form in a DoubleClick handler (and double-click on the node, obviously); however, if I use a Click (or MouseClick) handler and open the other form when the Control key is pressed, it opens the other form correctly but returns focus to the original