focus

WPF HwndHost keyboard focus

有些话、适合烂在心里 提交于 2019-12-21 21:58:08
问题 The chart area in the screenshot is a HwndHost control which hosts a native Win32 window (with it's own registered WNDCLASS) implemented in C++/CLI and drawn with Direct2D. The HwndHost is hosted in a WPF Border control. The problem I have is that I can't set the keyboard focus to the hosted Win32 window. I want the focus to move to the hosted Win32 window when the used clicks on the chart area. I tried calling SetFocus on WM_LBUTTONDOWN, but that screws up the focus in the rest of the

Jquery mobile 1.4 on iOS the fixed elements on bottom of page hide input text onfocus

孤街醉人 提交于 2019-12-21 21:43:34
问题 Hi there I am building cordova 3 app with Jquery mobile 1.4 Safari, and Chrome on my mac have no issues with the following, but when I deploy on the real device, or iOS simulator and want to type in the fields I get the bottom fixed elements of the page moving up and overlapping the input elements. The cursor is blinking in the right position, where the input field is, but the slider of the footer is hiding it. To make it simple my page looks like that: [header fixed] div with input text div

.focus() “set focus on a target input” will not work in Firefox

霸气de小男生 提交于 2019-12-21 21:22:10
问题 I have an input field. Under certain conditions I want to keep the user focused on the input field when they hit the Tab key. Basically I'm mimicking the functionality of Google's auto populating search box. I have everything working fine in every browser except the one I never have problems with... Firefox!? The following code works as expected in IE, Chrome and Safari, if you Tab out of the textbox with class myInput, your focus stays in the textbox. But in Firefox, when you Tab out of the

Stop newly created dialog from taking focus

假装没事ソ 提交于 2019-12-21 20:45:54
问题 I'm trying to have Java Swing dialog be created but I don't want to have the dialog to take focus away from whatever is currently focused. So for example, if you're editing a word doc and a different application creates a dialog, you should see the dialog but the word doc should remain in focus so that you can keep editing. I've tested the following code on Mac OSX and on Ubuntu 12.04. On Mac, the code creates dialogs that do not take the focus like I want. On Ubuntu, the dialogs take the

How to disable/modify AutoFocus and AutoWhiteBalance on Android Camera using OpenCV

一曲冷凌霜 提交于 2019-12-21 19:20:12
问题 I'm using Android + Opencv(new to opencv) and I'm currently working with real time object detection (the object stays really close to the android device Camera) , and I noticed that the Android camera's autoFocus keeps modifying my frames (kind of 'zoom in' and 'zoom out' effect) which make it harder for me to keep tracking the object. I need to turn the "AUTO FOCUS" off because in my case the more blurred image input I have, the better, and I also need to turn the AutoWhiteBalance off as

ExpandableListView child items don't get focus when touched

杀马特。学长 韩版系。学妹 提交于 2019-12-21 16:57:21
问题 Ok, so I wrote an ExpandableListView and subclassed BaseExpandableListAdapter... Everything works fine except I cannot get the child views to take focus when clicked. If I use the trackball everything works fine. But if I try to click on a child I get no feedback whatsoever. I have tried setting android:focusable, android:focusableInTouchMode, and android:clickable (and I have also tried setting this via code) but I can't get anything to work. Any ideas? Here is my Adapter code: public class

Android TV move focus between RecyclerViews

大憨熊 提交于 2019-12-21 12:59:59
问题 I am building an Android TV app with the following layout: Both lists on the left and on the right are RecyclerViews with vertical LinearLayoutManagers, Header view is static. Navigation with D-PAD works fine within one list, but when switching from one list to another there are issues. Focus moves from, say list1's item 5 to list2' item 5. When list 2 is short has less than 5 items, it just loses focus. I want the last focused item index saved and when the user navigates list1-list2-list1

Focus and TabIndex on UserControls

馋奶兔 提交于 2019-12-21 12:59:27
问题 I have a strange behaviour: I have a MainWindow containing textboxes and (simple) usercontrols (textbox and button), but I stripped this to only a textbox for debug purposes. When I use textboxes and usercontrols WITHOUT setting a TabIndex property the cursor steps through the controls in right order (in the order the controls are added to the window) When I use textboxes and usercontrols WITH setting a TabIndex property the cursor steps through the controls in invalid order (first all

WPF ItemsControl - how to know when the items finished loading, so that I can focus the first one?

霸气de小男生 提交于 2019-12-21 12:21:27
问题 I have an ItemsControl in my View, that is bound to an ObservableCollection from ViewModel. The collection is filled, and afterwards an event from VM to view is raised (think search results and SearchFinished event). I would like to move keyboard focus to the first item in an ItemsControl, but when I do it in View's code-behind when handling SearchFinished, the items are not yet rendered (the collection is filled already, but wpf's rendering is asynchronous and didn't happen yet), so there is

Force focus on one element with an exception. (jQuery)

老子叫甜甜 提交于 2019-12-21 12:15:14
问题 I have two input fields. I want to force the focus on #area no matter where the user clicks unless it is on #input. I've tried something like this, but since input is part of document, it does not work. $("#area").focus(); $(document).click(function() { $("#area").focus() }; $("#input").click(function() { $("#input").focus() }; Thoughts? 回答1: change it to $("#area").focus(); $(document).click(function() { $("#area").focus() }); $("#input").click(function(e) { e.stopPropagation(); $("#input")