focus

Answered - JavaFX: SubScene won't focus inside TabPane when clicked? [closed]

馋奶兔 提交于 2020-01-04 06:40:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 months ago . [ Issue ] : Seems like the behavior of SubScene or TabPane isn't what i was expecting or something is wrong with it. Because Instead of Being Focused on Subscene [*1.] when i click on Subscene it focuses on TabPane . Even when i force it to focus on the SubScene it forces back & focuses on TabPane [*2.] (Is in

Thinning down a jquery focus script?

北城以北 提交于 2020-01-04 06:08:30
问题 I have a really simple jQuery script which when an input element is focused on, it expands its width to 250px (using the focusin() event), and when the focus is lost, it shrinks back to 200px using the focusout() event. But I'm not sure I'm using the most syntactically efficient code for what I'm trying to achieve. Here is my current code: $(document).ready(function() { $('input').focus(function() { $(this).animate({ width: "250px" }, 500); }); $('input').focusout(function() { $(this).animate

Java: break focus cycle in jtable

流过昼夜 提交于 2020-01-03 22:57:23
问题 In my JTable, I want to edit all relevant cells like in Excel. I implemented that ENTER stops editing the cell and transfers focus to the next cell. However, when I hit ENTER in the last cell, the focus cycle makes me jump to the fist cell. But I want to continue outside the table and set focus to a JButton. How can I break this cycle? 回答1: JTable is not a spreadsheet, but setCellSelectionEnabled() should allow you to proceed. Use setDefaultButton() as required, for example. Addendum: In

Setting Focus to an iFrame in IE

♀尐吖头ヾ 提交于 2020-01-03 13:00:51
问题 There is a tree menu in my application and on click of the menu items, it loads a url in a iFrame. I like to set the focus in an element of the page loaded in the iFrame. I'm using this code, and it works perfectly in all the browsers except IE : var myIFrame = $("#iframeName"); myIFrame.focus(); myIFrame.contents().find('#inputName').focus(); I have tried all different options like using setTimeout, but no chance. After the page loads, when I hit the tab key, it goes to the second input,

AutoPostback with TextBox loses focus

烂漫一生 提交于 2020-01-03 08:49:15
问题 A TextBox is set to AutoPostback as changing the value should cause a number of (display-only) fields to be recalculated and displayed. That works fine. However, when the field is tabbed out of, the focus briefly moves on to the next field, then disappears when the page is redrawn so there is no focus anywhere. I want the focus to be on the new field, not the textbox I've just changed. Is there a way to work out which field had the focus and force it to have it again when the page is redrawn?

Putting focus on a textbox in onchange event

ε祈祈猫儿з 提交于 2020-01-03 03:16:23
问题 I am trying to get it so that when a certain value is put into a textbox, the focus will stay on the textbox(and an alert will be shown in production). I am trying to get this to work in Firefox 3.5.7 with no luck. How can I make it so when a textbox is a certain value at onchange that it will stay focused/refocus on the textbox? Live example is at http://jsbin.com/ipina <body> Enter your name: <input type="text" name="fname" id="fname" onchange=" if(this.value=='foo'){ this.select(); this

Can gtk menus displayed via gtk_menu_popup release focus?

回眸只為那壹抹淺笑 提交于 2020-01-02 16:22:24
问题 I'm refactoring some code that normally requires the user to click a button for a popup menu to appear (it appears beside the button), what I'm trying to do is show the popup menu if the user hovers the mouse over the button icon for a preset duration and hide it again if the user moves onto another button icon. However, activating the menu via gtk_menu_popup steals mouse and keyboard focus, I have made little progress trying to grab focus for the button widget. Is it possible to return focus

Button inside ListView not clickable

ぐ巨炮叔叔 提交于 2020-01-02 16:22:10
问题 I want to be able to click on a button inside an item of a ListView. It should have a different effect from clicking the whole item. I realize there are several questions asked on stackoverflow, but none of the suggestions works for me. The ListView is inside a Fragment. Layout of the fragment: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"

Flex / AIR, how to set focus on a UI Control, Button, etc?

南楼画角 提交于 2020-01-02 08:19:48
问题 So, I'm trying to set focus on a specific button when the app launches (or later based on certain events), so that the user can simply hit return to press the button. None of the following approaches work however. protected function group1_creationCompleteHandler(event:FlexEvent):void { //btnBrowse.setFocus(); focusManager.setFocus(btnBrowse); } 回答1: Try: protected function group1_creationCompleteHandler(event:FlexEvent):void { callLater(btnBrowse.setFocus); } 回答2: Flex doesn't have focus on

PyQt window focus events not called

只愿长相守 提交于 2020-01-02 07:08:21
问题 I have a PyQt4 program where I'm trying to get notified when a window gets focus, following the advice in the QUndoGroup docs: It is the programmer's responsibility to specify which stack is active by calling QUndoStack::setActive(), usually when the associated document window receives focus. But I have a weird problem where only one window actually gets the focusIn and focusOut events, while the others either receive only one at their creation, or else never receive them at all. Here is an