I'm creating a form with a select dropdown. One of the options is "other - please specify", which is supposed to display an extra text field for more details.
I managed to do it using onChange event + some simple value check (as I can't rely on the position).
I started testing it and realized that while it works perfectly when using a ...
I have a text box that has spell check enabled. It is inside a popup. This enables me to edit multi line text in a datagrid, when the text is being edited the text box it is in grows over the top of the grid instead of resizing the height of the row.
The problem is that when the red squiggly lines appear to indicate a spelling mistake i...
I have a TreeView control in a Windows application. I am opening another window from the TreeView click (Single Click) event (in tabbed environment, so all windows will appear as a tab in Visual Studio). I want to set focus to one control of the new window.
The problem is that, I am able to set the focus on the double click event of th...
hello
while designing my user control, i encountered the following problem:
i would like to set the UserControl.CanGetFocus to false, which is not possible due an error message telling me that a control unable to receive focus can not contain elements who are able to receive focus.
but as i don't want them to actually receive any focu...
from Tkinter import *
app = Tk()
text_field = Entry(app)
text_field.pack()
I want to be able to check if text_field is currently selected or focused so that I know whether or not to do something with its contents when the user presses enter.
...
I want that from the PreviewTextInput handler a new control is created and focus is set to it. But even after calling Focus() on the new control, the cursor is still in the old textbox.
The handler UserControl_PreviewTextInput is registered on the UserControl which contains this textbox if this matters.
private void UserControl_Preview...
I am writing a grid control which I based on TCustomControl so I can handle all the structure, painting and navigation myself. The bit that I can't seem to figure out is this:
In my constructor, I set ControlStyle to this:
ControlStyle := ControlStyle + [csCaptureMouse, csClickEvents,
csDoubleClicks, csNeedsBorderPaint, csPannable]...
How can I prevent bindingSource Current item from changing?
(there is no changing event with cancel argument...)
This is scenario:
I have a dataGridView, and text-boxes on the same form.
I am using text-boxes to change values in the datasource (with standard databinding)
Bindings are written manually (After save button is clicked)
Whe...
How do you get row number DataGridView cell? Specifically, if a user has selected a single cell, how can you get that row number? It needs to access a particular cell based on what the user has selected.
I know that the RemoveAt method can be used to remove at the Focus, but you cannot get the row number at focus apparently?
Thanks for...
I need to use JQuery like the follwoing:
var focusFlag = 1;
jQuery(window).bind("focus", function(event)
{
focusFlag = 1;
});
jQuery(window).bind("blur", function(event)
{
focusFlag = 0;
});
Does anyone know why this doesn't work for IE?
...
I want to navigate in my window with the arrow key. It works so far but if I reach the end of my window, focus wraps to the first main menu item. But I want that focus stops at the last control in my window.
private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Down)
{
elem.MoveFocus(FocusNaviga...
I have a Silverlight game controlled by the keyboard, and I want it to go into pause when it loses the keyboard focus (e.g. the user clicks on another part of the hosting webpage, or moves to another browser tab).
I used to do this in Silverlight 1.1 by subscribing to the LostFocus event on my RootVisual UserControl, but in the last tw...
Hello,
I'm trying to show up a container if a input field gets the focus and - that's the actual problem - hide the container if focus is lost. Is there an opposite event for jQuery's focus?
Some example code:
<input type="text" value="" name="filter" id="filter"/>
<div id="options">some cool options</div>
<script type="text/javascr...
I have a form with a few input fields. When a user clicks on an input field, a hidden div appears with some selections for that field, they can then choose an option, and this set as the field value.
Currently, the way the div gets hidden is when the user selects an option. This works fine, but what if a user does not want to select...
In a minigame that is part of a larger flash game we show a number of editable textfields, about 10 rows with two textfields per row. Every row of two textfields is encapsulated in a class, and objects of that type are placed under each other so that it looks like some sort of table.
Now on Firefox the tab behavior is fine, after manual...
I'm coding a combo box of sorts right now. While I've gotten as far as to show a div layer at a particular location after clicking an image, I'm not sure how to hide the layer if I click on ANY OTHER part of the webpage. Like a dropdown list works when it loses focus.
I'm trying to duplicate the functionality seen here:
http://demos...
What is the proper method to set the focus to a specific field within a dynamically loaded DIV?
$("#display").load("?control=msgs"); // loads the HTML into the DIV
$('#display').fadeIn("fast"); // display it
$("tex#header").focus(); // ?? neither that
$("input#header").focus(); // ?? nor that
$('#display', '#header').foc...
I often get sent to sites where I need to do a code review of a system I am not involved in, and once reviewed won't be involved in again. I spend time during the usual tool tests and looking for patterns but at some point you just need to read code.
After the first 5000 or so lines it just becomes impossible to focus on the code, espe...
I have written a simple MSN-style program that will send and retrieve messages using WCF. The main form contains a Textbox to type in the message to be sent. In the background the application polls the server every few seconds for new messages. When a new message is received a new window is opened to display it. This has to be done on th...
Hi,
I'd like to implement drag&drop in wxPython that works in similar way that in WordPad/Eclipse etc. I mean the following:
when something is being dropped to WordPad, WordPad window is on top with focus and text is added. In Eclipse editor text is pasted, Eclipse window gains focus and is on top.
When I implement drag&drop using wxPy...