Questions tagged [focus]

Focus indicates the component of the graphical user interface which is currently selected to receive input.

Focus indicates the component of the graphical user interface which is currently selected to receive input. Text entered at the keyboard or pasted from a clipboard is sent to the component which currently has the focus. Typically, the focus is withdrawn from an element by giving another element the focus.

The concept is similar to a cursor in a text-based environment. However, when considering a graphical interface, there is also a mouse cursor involved. Moving the mouse will typically move the mouse cursor without changing the focus. The focus can usually be changed by clicking on a component that can receive focus with the mouse. Many desktops also allow the focus to be changed with the keyboard. By convention, the tab key is used to move the focus to the next focusable component and shift + tab to the previous one. When graphical interfaces were first introduced, many computers did not have mice, so this alternative was necessary. This feature makes it easier for people that have a hard time using a mouse to use the user interface. In certain circumstances, the arrow keys can also be used to move focus.

7243 questions
3
votes
2 answers

Custom NSButton Focus Ring Color

I've subclassed a NSButton and NSButtonCell, I've changed the drawings. Now the focus ring no longer appears on the button. I'm looking for a way to draw a focus ring with a custom color, on my custom button. Question Updated
Abcd Efg
  • 2,146
  • 23
  • 41
3
votes
1 answer

Accessible full width dropdown menu with Jquery hover, focus and blur

I have a full-width drop-down menu that shows all submenu's on hover or on getting focus (to make it keyboard-accessible). It's a menu you see often, but keyboard accessibility I haven't found examples of implemented in a way that it simulates the…
Michelle
  • 43
  • 4
3
votes
1 answer

iPhone - Safari parent window focus issue

I am having a peculiar problem with a website i am developing. The problem only happens on the iPhone(safari). My setup is as follows. 1) I have a CLIENT page - shows an initial page, and has a login button. 2) User clicks on the LOGIN button, and…
user1673101
  • 31
  • 1
  • 2
3
votes
1 answer

Button with outline ( Background color ) in bootstrap

I'm using bootstrap to get some design on my website. This button gets an outline in yellow which isnt supposed to be there. If i click anywhere on the page after the pageload, the yellow "border" disappears. Anyone got a clue what might be wrong?…
sindrem
  • 1,211
  • 5
  • 24
  • 45
3
votes
1 answer

Managing input focus on an MFC SDI multiple view application

We have a relatively large MFC application that uses an SDI to host a number of dynamically created CView- based views. The basic structure of the application is somewhat like Outlook (tree view on the left, dynamic view(s) on the right). I've been…
Darren Ford
  • 856
  • 5
  • 10
3
votes
1 answer

How do I check if focus has switched to a new element after another has blurred using jQuery?

I have a text input on my page. When it receives focus, a select box appears underneath it. When it loses focus, I want the select box to disappear unless the focus has shifted to the select box. Sounds simple enough but I struck a problem. I set up…
brad
  • 9,573
  • 12
  • 62
  • 89
3
votes
2 answers

Automatically change focus among Editfields in Blackberry

I have five EditField objects in my BlackBerry app, each one will accept only one numeric character. I want to change the focus from the first EditField to the second EditField when a character is entered. Note the focus from one to another…
3
votes
2 answers

Exception changing focus with the tab key in a .NET application

I have a very simple Windows application, with a few controls, a DataGridView and the Adobe PDF viewer control. The app works fine except when tabbing around to switch focus between controls, I regularly get the following…
Jon
  • 5,247
  • 6
  • 30
  • 38
3
votes
2 answers

Start editing in a cell in JTable on gaining focus

I have defined cell editors for the two columns in my table in the following manner: Java Code: JComboBox combo = new JComboBox(); //code to add items to the combo box goes here. JTextField textField = new…
zerone
  • 105
  • 1
  • 3
  • 10
3
votes
3 answers

Is it possible to avoid Focus on SplitContainer?

The WinForm SplitContainer gets the focus when it's dragged or clicked, while the Splitter does not. The side-effect of this, is that dragging a SplitContainer bar fires Leave/Validate on other controls, and I need to avoid this. I already tried…
Filini
  • 2,109
  • 2
  • 22
  • 32
3
votes
1 answer

HTML click submit button twice

I recently added a CSS3 focus styling to a element of a form (it grows vertically as to give more room to write). However, now when a user clicks the submit button, the textarea loses focus (and shrinks), but the form does not submit and the user…
J3RN
  • 1,683
  • 4
  • 20
  • 27
3
votes
1 answer

Apply the focus rectangle to a child element

In a control I'm currently working on, when an item is focused, the default focus rectangle spans the entire row and all of its visible child items. I know how to hide that. But I still want such a focus indicator when the item has the keyboard…
ygoe
  • 18,655
  • 23
  • 113
  • 210
3
votes
1 answer

Unexpected behavior with window focus events

I'm creating an application with Swing, and I've got a problem. I want to handle the focusLost() and focusGained() events, but I think my code is buggy. I've got the following, test code: addWindowFocusListener(new WindowFocusListener() { …
m4tx
  • 4,139
  • 5
  • 37
  • 61
3
votes
4 answers

CSS Focus unable to affect other elements

I've looked around and I can't find the solution for making a title appear when a form is focused. I'm probably missing something glaringly obvious (probably that it can't be done with this selector). Ideally I'd like to avoid jQuery and stick to…
2xAA
  • 308
  • 3
  • 11
3
votes
2 answers

Keep

I've seen similar topics posted on SO but mine is slightly different. I'm trying to keep my parent DIV (and children) in focus until I focus out of the div, and it seems surprisingly hard to accomplish. This solution I thought would work but it…
Ryan Grush
  • 2,076
  • 3
  • 37
  • 64
1 2 3
99
100