focus

Java - change focus on key press

I am writing a Java Application for Data Entry using Eclipse and SWT. Naturally it has a great many Text objects. What I would like to happen is that when user enters something into one field focus automatically changes to the next field. Thanks in advance ...

Maintaining focus and reducing interruptions

Locking doors or putting on headphones is more of an avoidance strategy which tends to reduce productivity. Instead, I'm looking for ways to increase productivity. How do you maintain focus and reduce interruptions in your workplace? ...

What should I do while I'm waiting for the build / the tests / the database migrations to run?

As best-behaved as I try to be about keeping my unit tests disconnected from the database, etc. etc, it still seems inevitable that my day will be interrupted by small regular enforced breaks while I wait for my machine to do something boring. I personally find swordfighting makes me lose my train of thought. I'm often 'in the zone' w...

How to set the focus to the first input element in an HTML form independent from the id?

Is there a simple way to set the focus (input cursor) of a web page on the first input element (textbox, dropdownlist, ...) on loading the page without having to know the id of the element? I would like to implement it as a common script for all my pages/forms of my web application. Thanks! ...

How Do You "Lock" the focus of a form to a specific control?

How does one lock the focus of a .net application to a specific control? For example, if I have a form with 5 text boxes, and I want them filled out in a specific order, how can I stop someone who is in box 1 from tabbing/clicking to box 2, or hitting OK or Cancel or anything else? Is there an easy way, or do I have to manually disable...

Detecting an Application Focus Change / Hooking something for HWND changes?

How could I detect when any application loses focus? Is there any system hooks to use? I want to pick up when ever a new application is in focus, or when one is lost. Even having the "current" HWND of the user would be good. I am using C#, however, its all win api stuff I am sure... so any info would be great. ...

which HTML element lost focus?

in javascript, when I receive a focus event, how can I work out which element has lost focus? I'm trying to avoid having to put an onblur event handler on all elements within my web page. ...

Style ancestor element of form input:focus (jQuery)

I have a form with a DIV, 3 INPUTS, each INPUT sits within a LABEL element. I would like to change the background image of the DIV element when focusing on each INPUT. I can't move back up the DOM to fix this with CSS, so could someone suggest a few lines of jQuery please? Thanks ...

Textbox validation, focus switching issue

Good morning, I am working on a C# winform application that is using validation for the controls. The issue I'm having is that when a user clicks into a textbox and attempts to click out, the validation fires and re-focuses the control, basically the user cannot click out of the control to another control. My desired result is to have ...

Move the cursor programmatically from one page to other page using JavaScript

Hello, I have 2 pages on the screen (actually more as it is a kind of proprietary web application with a few frames and I cannot figure out actually the whole structure) I enter the search criteria in a page, I press ‘Enter’ on the keyboard , search is executed and the other view is filled with data. There is a button ‘Confirm’ on this...

When a Qt widget gets focus

I'm a new in Qt Designer 4.4.1 Open Source Edition. I used to program in Windows Borland C++ Builder and I've switched to Linux. I do not know how to gain the control when a widget (a LineEdit in the specific case) gains the focus, no mater if by tab or by clicking or by any other medium. My Focus Policy to the widget is "strongFocus", ...

JQuery focus

Let say i have the next markup: <div id="content"> <div id="firstP"><p>First paragraph</p></div> <div id="secondP"><p>Second paragraph</p></div> <div id="thirdP"><p>Third paragraph</p></div> <div id="fourthP"><p>Fourth paragraph</p></div> </div> I want to add a new div with Javascript and focus in this new element. Fo...

How to stop editing with DefaultCellEditor when a separate JBtton is pressed

Hi, I got a table with a custom TableCellEditor (extending DefaultCellEditor) with a JFormattedTextField as the editor component. Now I got problem: when I press a separate button while editing. When the button is pressed, the editor remains "open and active" while I'd want it to stop editing so that the changes made would be available...

WPF ListBox Image Selected the saga continues

Ok in my ListBox scrolling images w/ text, etc. the saga continues. When I click one of the items, to select it, that runs a process to open a web browser and go to a specific URL. The problem I'm having now is that when the WPF app loses focus, and the web browser opens, the item clicked inside the listbox turns white. Here's the whole ...

Override the getFocus of an external page that loads in iframe

I have multiple pages laoding in an iframe and one of them seems to be getting focus, since the page scrolls (by itself) to that spcific iframe. Is there a way to override this? ...

Javascript: How do I skip items when tabbing without using tabindex?

Is there a good way, in a javascript onfocus() handler, to trampoline the focus to the next item in the tab order, without having to manually enter the ID of the item that should be next? I built an HTML date picker in Django/jQuery. It's a line edit followed by a calendar icon that pops up a calendar. I want to be able to tab from th...

how to control focus in JTable

What I want to do is when user finish editing of data in table cell to move focus onto another cell depending of what user entered, and to turn that cell into editing mode so user can start typing immediately with no additional action. This way user can focus on his work and software will do the 'thinking' about which cell should be edit...

How do I focus a foreign window?

I have an application which may only have one instance of itself open at a time. To enforce this, I use this code: System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses(); System.Diagnostics.Process me = System.Diagnostics.Process.GetCurrentProcess(); foreach (System.Diagnostics.Proc...

Set Focus to a textbox after data validation in .ASP page

I am working on an asp page that verifies information in a text box after the user types it in. A “product number” is manually entered (free form). Using the after update event, I have the page post the data and lookup the product number to determine if it is valid. If not valid an error message is posted in the box, otherwise the produ...

Android : Multiple Actions on a List View - Focus Issue

I would like to implement a ListView, which I can do no problem w/ my cursor. Right now depending on which row you click on it takes you to a new activity based on the information pressed on that row (just like it should, and as expected). I would like to have a button however to delete the row, so a user can press any part of the row to...