focus

Controling tabbing focus within popup javascript widget context

Hello, I'm working on a lightbox style javascript plugin that pops up an image with next+previous buttons and a close button. I want to make it so that tabbing will only jump between the three presented buttons in the popup, not go through the three of them and then continue on the page content in the background. Does anyone have any s...

HTML/JavaScript: Page's focus

I have a shopping cart-like form. When a user clicks on the page, in an empty space, somehow, the "Delete Item" button gets focus. Therefore, if the user clicks somewhere and presses enter, items are deleted from their cart. This only happens in IE. What might be causing this? How can I make sure the only time this button gets focus is ...

Problem with drawing focus frame in Qt

I'm trying to create custom widget inheriting QFrame. All works fine, but I'm unable to draw the focus rectangle around my widget. Below is the sample code I use for drawing: frame.h class Frame : public QFrame { Q_OBJECT public: Frame(QWidget *parent = 0); ~Frame(); protected: void paintEvent(QPaintEvent *event); private...

WPF "Selected" Property of Custom Control or "Logical Focus". What should be used?

In my WPF project I have a custom control which is visually represented by a rectangle object. In XAML I put a number of rectangles based on this custom control. User should be able to select a group of these rectangles by mouse clicks and then do some actions with these selected rectangles. How I should implement the possibility of sel...

Can a website pass focus to the browsers url field?

Can I create a piece of code for my website which focuses the browser url bar (field) so I can directly start typing in a new url? There could be for example a predefined hotkey which would execute this code. Background: My (mouse-less) webapp steals the focus when loaded, so keyboard shortcuts can work. Users requested a possibility t...

how do i make that dang wpf popup go away?

when i use a popup, it seems to hang around. in the code below i attach a popup to a textBox using by overriding the control template, and make the popup appear when the TextBox has focus. When you tab to the next on screen element the popup goes away, but if you just alt-tab to a different application the popup stays there in the foregr...

WPF Launchy Clone (Focus problem)

I have a WPF application that has some functionality that is very closely related to Launchy - i.e., someone presses Ctrl+Space and they receive a search bar. This functionality should be available throughout the system, and I have used the ManagedAPI.Hotkey code to make this work - and it does. The problem is that when the search wind...

TreeView in Winforms and focus problem

Hi, Can anyone please explain to my why the form in the code below gets out of focus when selecting a treenode in the tree? What should happen is that the form/button should get the focus when the tree disappears like the listview example but it doesn't. Code example: using System; using System.Collections.Generic; using System.Compon...

Detecting lost window focus in Google Chrome

I need to know via javascript whether a page has focus or not. When the user switches to another tab, minimizes the browser, or clicks outside the browser, the page shouldn't have focus. When the user returns to the window, by opening it, returning to the tab, clicking on the page, the page needs to have focus. The problem is the meth...

QSlider focus issue (Mac Leopard) with QApplication::focusChanged(QWidget*,QWidget*)

Hi, I'm using Qt 4.6.0 in Leopard 10.5.8. I have a few sliders. Every time I slide/click on a slider, it gets focus in Windows. However, it does not get focus on Mac. I have to manually click Tab to change focus. How to rectify this? Thanks in advance! ...

How to receive key events during a drag&drop?

Hi there, I'm currently trying to receive key events during a drag and drop, but it seems to me that the focus is taken away while dragging so that I can't listen to any key events. I'm dragging a JComponent subclass that implements KeyListener and requests the focus in the DragSourceListener's dragEnter method, but my assumption is th...

Make a tkinter window appear over all other windows

#!/usr/bin/env python # Display window with toDisplayText and timeOut of the window. from Tkinter import * def showNotification(notificationTimeout, textToDisplay): ## Create main window root = Tk() Button(root, text=textToDisplay, activebackground="white", bg="white", command=lambda: root.destroy()).pack(side=LEFT) r...

Giving focus to GNOME docked window

I've got a GTK/GDK docked window that I need to give keyboard focus to, so accelerator keys (shortcuts) work. Does anybody know if GNOME even allows a docked window to have keyboard focus, and if so, how can I enable it? Thanks, Mike ...

Setting focus on QLineEdit while showing the QListView view

In Qt, there is a QCompleter class which provides auto-complete funtionanity. I want to use QListView to finish the same thing. In the following code, When the QListView shows, QLineEdit will lose focus. How could I keep QLineEdit's focus? 1) mdict.h: #include <QtGui/QWidget> class QLineEdit; class QListView; class QModelIndex; class...

Javascript focus on browse button of file input

I am trying to focus on the browse button of the file input control. so I have something like <input type="file" name="upload" id="upload" > and in javascript I have document.getElementById("upload").focus(); but the focus remain on the text field and comes to browse button only after i hit tab. Is there a way that I could write ...

jQuery rounded corners + focus() in IE8

Hello I am developing a web application in ASP.NET MVC. I have recently added rounded corners using the jQuery Rounded Corners plugin (http://plugins.jquery.com/project/corners). This seems to have upset IE8 (but not 6 or 7, or Firefox) because I can no longer set the focus in $(document).ready(). Here is an example of the problem: ...

UI Issue - Controlling Control state and focus

I've reached a bit of an impasse when developing a .NET windows forms app. The problem has to do with switching focus between controls, and how it plays with maintaining the form's control's states. There are three main controls in the UI – two combo boxes and a button. Both combo boxes start off with SelectedItem = null. Both combo b...

how could a <ul> element receive the focus event?

I'm running the following code to trace the tagName of every control that gets focus in an HTML document: $(function() { $("*").bind("focus", function() { console.log("tabbed " + this.tagName); }); }); When this runs I can watch the firebug console and see it trace tags like "A" and "INPUT" which I'd expect to receive ...

How to change the focus order in a custom panel with keyboard navigation?

I have a custom panel with some items. When one item has the focus and I want to navigate to the next item by pressing the right arrow, the focus jumps to the nearest item to the right. However, I want the focus to move to another item, determined by my own logic. How can I change the focus order? ...

Detecting a control's focus in Silverlight

Is there any way to tell whether a control (specifically a System.Windows.Controls.TextBox) is focused in Silverlight? I'm looking for something like the following (what you would see in a regular .Net application): textBox.Focused This seems like something simple and trivial to leave out from a control, and yet I can't find an answer...