lost-focus

Winforms combobox loses autocomplete value on lostfocus

前提是你 提交于 2019-12-18 08:39:12
问题 I am having issues with the Winforms combo box losing the value found during an autocompletion when the user tabs to the next control. Here is a code sample (as an Nunit Test that will pop up a form): [Test] [STAThread] public void Testing_AsDropDownList() { var comboBox = new ComboBox(); comboBox.DropDownStyle = ComboBoxStyle.DropDownList; comboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; comboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode

Appears default JButton when button looses focus

旧时模样 提交于 2019-12-14 02:29:53
问题 Button lost focus: Button has focus: Short code: MLibrary = new JButton(); MenuPane.add(MLibrary, new AnchorConstraint(0, 0, 0, 0, AnchorConstraint.ANCHOR_ABS, AnchorConstraint.ANCHOR_NONE, AnchorConstraint.ANCHOR_ABS, AnchorConstraint.ANCHOR_ABS)); MLibrary.setText("Library"); setButtonDefaults(MLibrary); MScheduler = new JButton(); MenuPane.add(MScheduler, new AnchorConstraint(0, 0, 0, 110, AnchorConstraint.ANCHOR_ABS, AnchorConstraint.ANCHOR_NONE, AnchorConstraint.ANCHOR_ABS,

How to correctly handle Android EditText input inside a ListView?

浪尽此生 提交于 2019-12-09 13:44:28
问题 In my application I have an activity to add/remove/edit records inside a SortedMap . The activity is implemented as an extension of ListActivity . I have implemented custom ArrayAdapter for the collection items. Every ListView item (which corresponds to an underlying record) consists of TextView s, EditText s, and a Button to delete the record itself. The layout is roughly as follows: ListView ---------------------------------------------------- [TextView] [EditText] [TextView] [EditText]

Did user use keyboard or mouse to leave WPF TextBox?

☆樱花仙子☆ 提交于 2019-12-08 19:30:20
问题 I have a handler for the TextBox's PreviewLostKeyboardFocus event. It fires when I leave the TextBox using the keyboard (Tab key) or the mouse (by clicking on another TextBox on the form). The handler takes a KeyboardFocusChangedEventArgs , which has a property named KeyboardDevice , which isn't null in either scenario (I was hoping to find null here when using the mouse). Question: How can I tell whether a user used the keyboard or the mouse to leave a WPF TextBox? 回答1: The e.KeyboardDevice

how to regain focus on a edit text when expandable list is reloaded…?

天大地大妈咪最大 提交于 2019-12-08 10:44:42
问题 I have a ExpandableListView in which i am loading custom layouts in both group and child views. They are having some edit text fields. When i click on the edit text, the soft keyboard appears, that time the list is reloaded, but focus will not be on the edit text. As a result the input i am typing is not entered in that edit text. If i clicked on the edit text again i can enter the values. But I want to regain its focus even after reloading the list view. I tried with storing the last clicked

How to trigger ASP.NET client-side validations without submit?

我是研究僧i 提交于 2019-12-07 09:40:19
问题 I have a website in ASP.NET (WebForms, NOT MVC) which has a survey form divided in several slides. Each slide has a next button that, obviously does a transition (client-side, not post back or remote request) to the next slide. In each slide I have several ASP.NET controls with their related validators. I want this validators to be triggered when I click the next button (or maybe when each input loses focus?). I remembered ASP.NET doing client side validation on lost focus, but maybe I'm

Determine Where Activation Is Going When A Form Is Deactivated

你离开我真会死。 提交于 2019-12-07 09:01:03
问题 Does anyone know of a way to determine which window is going to receive focus when a form is deactivated? 回答1: I found the answer. Instead of subscribing to the activated and deactivate events, handle the WM_ACTIVATE message (used for both activation and deactivation) in WndProc. Since it reports the handle of the window being activated, I can compare that handle to the handles of my forms and determine if focus is changing to any of them. const int WM_ACTIVATE = 0x0006; const int WA_INACTIVE

How do I find out where the focus is going in my WPF application?

本小妞迷上赌 提交于 2019-12-07 00:08:58
问题 I have a search screen in my WPF application. The screen is implemented as a UserControl in a TabItem of a TabControl. When the user switches to the Search tab, I want the focus to go into one particular field. So I added a Loaded event handler to the UserControl tag in the Xaml and I called the Focus method of the control I want to have the initial focus in the Loaded event handler. This worked great until I upgraded the Telerik control library I'm using today. Now, when I switch to the

How to trigger ASP.NET client-side validations without submit?

一曲冷凌霜 提交于 2019-12-05 15:19:41
I have a website in ASP.NET (WebForms, NOT MVC) which has a survey form divided in several slides. Each slide has a next button that, obviously does a transition (client-side, not post back or remote request) to the next slide. In each slide I have several ASP.NET controls with their related validators. I want this validators to be triggered when I click the next button (or maybe when each input loses focus?). I remembered ASP.NET doing client side validation on lost focus, but maybe I'm wrong... (I quit doing ASP.NET development about 3 years now, so I can't remember) Thanks UPDATE: It would

Determine Where Activation Is Going When A Form Is Deactivated

帅比萌擦擦* 提交于 2019-12-05 13:35:50
Does anyone know of a way to determine which window is going to receive focus when a form is deactivated? I found the answer. Instead of subscribing to the activated and deactivate events, handle the WM_ACTIVATE message (used for both activation and deactivation) in WndProc. Since it reports the handle of the window being activated, I can compare that handle to the handles of my forms and determine if focus is changing to any of them. const int WM_ACTIVATE = 0x0006; const int WA_INACTIVE = 0; const int WA_ACTIVE = 1; const int WA_CLICKACTIVE = 2; protected override void WndProc(ref Message m)