focus

How to give focus to default program of shell-opened file, from Java ?

From within Java, I am opening an Excel file with the default file handler (MS Excel, in this case :-) ) using the method described in this stackoverflow question: Desktop dt = Desktop.getDesktop(); dt.open(new File(filename)); However, the Excel program doesn't get the focus. Is there any easy way to do so? Edit: There is a related ...

Focus In An ItemsControl

I have an ItemsControl that uses a DataTemplate. The DataTemplate contains a TextBox, which can receive keyboard focus. I need to be able to move the keyboard focus from the currently focused TextBox in the DataTemplate to the next TextBox, as if the Tab key has been pressed. I've noticed that there is a UIElement.MoveFocus() method, ...

Some questions about focus on WPF

Hello, I've a little problem about focus on WPF. I whant to create a window, always on top, and that never get the focus (even if we click on it). Here's my solution : public partial class SkinWindow : Window { public SkinWindow() { InitializeComponent(); Loaded += ( object sender, RoutedEventArgs e ) => SetNoA...

porting an app to iPad: alternatives for a context-menu? UI advice please

Considering porting/rewriting an app for the iPad and need some UI advice. On the iPad is there a way to pop a context-menu up from a text field without the text field losing focus? If not, what is the closest thing in the UI to this sort of functionality? ...

ItemsControl and Focus Issue

I have an ItemsControl which is giving me issues. It has a DataTemplate, which contains a TextBox that is bound to a property in the code-behind. When I press the Enter key, a new element is inserted into the property. After this happens, the focus of the item in the datatemplate should shift down one item in the ItemsControl (done pr...

android disabled view are focusable

When I disabled views such as radiobutton or buttons with the setEnabled method, the views are still focusable but with view such as EditText they are'nt... I need to call setFocusable(false) if i want that all my views don't receive focus when they are disabled ? ...

How to focus on a specific div using window.location = [x] in jquery.

I've got a window.location function that redirects to a site that is not programmed by me. When the window is relocated I need it to focus on a specific div tag (with an id) within that page. Is there a way for me to do that if the page is not mine and I do not have access to the code? UPDATE so I've got this now and it's working... ...

how to lose control from text box when clicked outside

I have a textbox in a windows form. Currently the focus is on the textbox and i enter some text. Now I click outside the textbox but within the window. This action does not make the text box to lose the focus. The cursor still blinks in the text box. If the click was on another control then the text box would lose the control. How would...

Do not want Form to display over other application windows

I am displaying a new Form from one process by passing the Show method the handle of a Form created in another process. I only want this new Form to display above the passed Form, like a MessageBox. However, this newly launched Form appears above other application windows, despite: Setting Process.WindowStyle.Hidden to the Form-disp...

Making :focus work in ie7 using css?

Is there a simple hack for this? I'd prefer to avoid javascript. ...

focus after animate

i'm tring to focus a textarea after a animate effect with: $("#textarea").live("click",function(){ if ($(this).attr("class") != "textarea_clicked") { $(this).val(""); $(this).animate({ height: "+=30" }, 150, function(){ $(this).attr("class", "textare...

jstree will not fire onchange event

i have been really stuck on this. this is the code: js: var treeoptions={"data":{"type":"json","opts":{"url":"\/surveytags\/treejson"}}}; $('#treecontainer').tree(treeoptions); $("#treecontainer").tree({ callback : { ondblclk : function (node, tree) { alert(node.id); }, o...

jsubmenu not getting focus after moving main panel displaying on cygwin

I have a java application running on RedHat Linux that uses swing components. To run the application, I do an ssh -Y from windows machine running cygwin to the RedHat Linux server and then run the application. My application has some menus on the main panel with each menu having submenus. If I don't move the main panel when the applica...

Why won't my control accept keyboard input?

I've built a custom control that I'm trying to send input to. It will accept mouse input and report MouseDown, MouseMove and MouseUp correctly, but for whatever reason, it won't accept keyboard input. When I click on it, it doesn't receive focus, and any keys I press get interpreted by whatever control had the focus already. This is p...

How do I stop/workaround Java apps stealing focus in Linux window managers

We want to quickly prototype widgets in Java. We overlay them on top of a display written in a proprietary 3rd party graphics package. We find that the Java GUI steals keyboard focus away from the window manager. The window manager is fvwm, I've tried configuring it so the Java app is setup not to get focus, and furthermore if it ever...

In Safari, using jQuery a Form Input Text Field does not receive focus after alert is displayed. Why?

I have an ASPX web form. I use jQuery to simply my Javascript. I use a Javascript validation script to validate each of the form fields' values. If an error occurs, I popup an alert with an error message. Then I transfer focus to the underlying element. Here are examples I have tried. Using jQuery: var Form_FieldDef = function(name) {...

Find the focused control in a form (in .netCF)

I have a form that I want to know which control on it has focus. How can I do this? Best solution I have seen has me iterating all the controls on the screen. While doable, it seems like a lot of work just to know which control has the focus. ...

Set focus and carret position in textarea according to mouse position, as if user had clicked

Once a page with a textarea is loaded, I want some textarea to have the focus immediatly if the mouse cursor is inside that textarea. This is the easy part because a onmousehover handler can set the focus. Now, how to I also set the position of the caret? I would like the caret to be where it would be if the user had clicked using the m...

jQuery focusin and append problem when textarea focus

Hello guys. I having problem with append() when the textbox is focus the second time. var i = 1; $('textarea').live('focusin', function(){ $(this).keydown(function(e){ var code = e.which; if(code === 13) { i++; $('#linenumbers').append('<li>' + i + '...

Custom Java ListCellRenderer - Can't click JCheckBox

Made a custom ListCellRenderer: import java.awt.Component; import javax.swing.JCheckBox; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.ListCellRenderer; /** * * @author Spencer */ public class TaskRenderer implements ListCellRenderer { private Task task; private JPanel p...