focus

How do I detect focus loss from a text edit object?

戏子无情 提交于 2019-12-22 06:57:38
问题 This is my first attempt to create a GUI in MATLAB. I haven't been able so far to find a way to detect when focus is moved from a text edit to some other object. I need such functionality so I can test "on the spot" the user input and change the text edit's background color to red, if the input is formed in an incorrect way. In other words, it would be very convenient for the end-user to be able to write his expression in a text edit, then press tab to move to the next text edit, and at the

Focus randomly jumps when scrolling

爱⌒轻易说出口 提交于 2019-12-22 06:08:13
问题 I have an activity with many EditText controls and checkboxes near them. By default, most EditTexts are disabled. When I open the activity, some random EditText control gets focus (a frame around it) and if you tap on it, the on-screen keyboard appears even though the EditText is disabled and no text appears when you press the on-screen keys. Also, my whole layout is wrapped in a ScrollView . When you scroll, some random EditText s get focus. It can be the lowest visible one, or the highest

Permanent NavigationView loose focus after an item is selected

筅森魡賤 提交于 2019-12-22 05:55:00
问题 I started a project with a Navigation Drawer from the basic template of Android Studio. The only modification I made was to display it as permanent in order to have a tablet/TV layout. To achieve this, the only modification I made was in the xml layout. This allow the NavigationView to be always visible. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match

Selenium IDE: How to check if an element has a focus?

断了今生、忘了曾经 提交于 2019-12-22 05:30:11
问题 Is there a built in method for checking that an input text element has a focus ? Well, I didn't find one, so I tried this extension. But, it doesn't work for me either (i.e. the test fails). Any ideas ? 回答1: I have had numerous problems detecting if an element has focus because the browser Selenium is controlling typically does not have the focus within the Operating System, and as such the browser will NOT consider any elements to have focus until the browser regains the focus. I have been

Delphi XE - TRibbon actions always send focus to MainForm

徘徊边缘 提交于 2019-12-22 05:10:54
问题 When I place a TRibbon control on a form that is not the MainForm of the application, that TRibbon's actions (i.e. Cut, Paste) will always return focus to the MainForm after the action is executed. This occurs even if the TForm that holds the TRibbon is not a child of the MainForm. I am using Windows 7 64-bit, Embarcadero RAD Studio XE Version 15.0.3953.35171. Am I using the TRibbon control incorrectly, or is this an issue with the TRibbon? 回答1: This is evidently by design. Sample code

jQuery Mobile focus next input on keypress

眉间皱痕 提交于 2019-12-22 04:26:09
问题 I have a jquery mobile site with a html form consisting of 4 pin entry input boxes. I want the user to be able to enter a pin in each input field without having to press the iphone keyboards "next" button. I have tried the following and although it appears to set the focus to the second input and insert the value, the keyboard disappears so the user still has to activate the required input with a tap event. $('#txtPin1').keypress(function() { $('#txtPin1').bind('change', function(){ $("

Splash screen does not return focus to main form

喜你入骨 提交于 2019-12-22 04:17:18
问题 I everyone. I currently have a problem with my focus when using a splash screen. I am using VS2008, with .NET framework 2.0. Also, I have linked my project with the VisualBasic.dll since I use the ApplicationServices to manage my single instance app and splash screen. Here is a code snippet simplified of what I tried debugging. namespace MyProject { public class Bootstrap { /// <summary> /// Main entry point of the application. It creates a default /// Configuration bean and then creates and

How do I modify properties of siblings with CSS selectors like :focus?

依然范特西╮ 提交于 2019-12-22 03:59:11
问题 I am having trouble with some code on my site, http://ethoma.com/wp/. In the search bar, on the left side, I want the usually dark gray "hit enter to search" to turn a light gray when the search field (its sibling) :focus is triggered. Here is the code I currently have: #s { min-width:98%; background-color:#2a2a2a; color:#d3d3d3; border:2px solid #000000; font-size:.85 em; height:1.9em; display:inline !important; border-radius:5px 5px 5px 5px; } #s:focus { border:2px solid #2a2a2a; }

Making composite focusable in SWT

眉间皱痕 提交于 2019-12-22 02:32:07
问题 Is it possible to create a focusable composite in SWT? I'm catching all keyboard events via Display filter, but there are some problems when the focus is on the tree or list - GTK+'s default action is to search in the contents of the control. What I want to do is to mix SWT and AWT with focusable AWT component. I managed to make the AWT widget unfocusable and I added Display filter to make the AWT component receiving keyboard events (but not directly), even when it's not focused. But there

Remove focus programmatically?

こ雲淡風輕ζ 提交于 2019-12-22 01:13:05
问题 I have a jquery ui dialog with tabs loaded dynamically/JSON with content. Due to the complexity, I can't really post a fiddle or a relevant code (too much code). What's happening is that when the dialog opens, you can tab through the elements within the dialog, up to the first tab. After that, you cannot tab through to anywhere else. The focus is locked on that tab, even if you click elsewhere, that focus is locked on that tab. I am unable to locate the actual cause of this issue. So, how