textbox

Textbox OnTextChanged and Button Click Event Not Firing

I have textboxes being generated by a repeater that use OnTextChanged with autopostback enabled so that I can know when when the values change. This all works perfect. The problem starts when I try to click on any buttons on the page. The loss of focus triggers the event for the OnTextChanged; however, the event for my buttons never get...

Reset TextBox.Background to default in WPF so it still gets updated when system settings change

I have a TextBox that I wish to reset its Background property to its default value after changing it to a different colour. I have tried setting it to SystemColors.WindowBrush, but then, if the Display Settings are updated to change this value, it doesn't get dynamically reflected in the TextBox (it does normally if TextBox.Background h...

Bound textbox not updating upon DataTable change

I have bound several textboxes to different rows in a DataTable, like this: txtCurLevel.DataBindings.Add("Text", dtTop, "CURR LEVEL"); txtNewLevel.DataBindings.Add("Text", dtTop, "NEW LEVEL"); txtProduct.DataBindings.Add("Text", dtTop, "P LINE"); txtCurRev.DataBindings.Add("Text", dtTop, "CURR REV"); Th...

What's the "Find Result" Control Visual Studio Integrated?

Hi, I am developing a simple Windows Application in C# and Visual Studio 2005. I need a search result control - just like visual studio integrated by itself. After I double click each line to trigger the individual event. I tried multi-line textBox Control, but whole the box can only support one click event. thank you. ...

How can I allow only 0 or 1 to be entered in a TextBox?

How can I limit the TextBox control to only allow the values 0 and 1? Thanks. And I have one more question: How can I disable put text from clipboard in my textbox control? ...

ASP.NET TextBox OnTextChanged event not fire

Hi at all. I've the following problem: asp.net TextBox server side control, fire onTextChanged only when it loose focus. I would like to fire my server side event each time user press a key. How can i do ? Thanks ...

embedded wpf textbox does not accept input

I put a wpf textbox inside a combobox to allow the user to enter a custom setting. I can read the keypress in the keydown event, but the text in the textbox does not change. What am I missing? <ComboBoxItem Name="GridSizeCustom"> <StackPanel Height="30" Orientation="Horizontal"> <TextBlock Text="Grid Size (8 - 200)...

Set the caret/cursor position to the end of the string value WPF textbox

I am try to set the caret/cursor position to the end of the string value in my WPF textbox when I open my window for the first time. I use the FocusManager to set the focus on my textbox when my window opens. Nothing seems to work. Any ideas? Note, I am using the MVVM pattern, and I included only a portion of the XAML from my code. ...

What is the easiest way to remove the Silverlight TextBox mouse hover border?

I want to display text in a Silverlight application so that the user can copy and paste it elsewhere (as one is used to doing on an HTML web site). If I use TextBlock, then the user cannot copy and paste. Therefore I use TextBox, but it has a default border on it. I can remove the border with BorderThickness="0" like this: <TextBox ...

Autoresize textbox control vertically

In a C# form, i have a panel anchored all sides, and inside, a textbox, anchored top/left/right. When text gets loaded into the textbox, i want it to auto expand itself vertically so that i don't need to scroll the textbox (scroll the panel at most, if there is more text that doesn't fit the panel). is there any way to do this with a te...

Unwanted Retriggering of Textbox Events

This is one of those "seems obvious" as how to do, but came across interesting side effect in implementing. I'm trying to keep two text boxes syncronized when information is updated. In this example, I will be using txtStartDate and txtEndDate. If the txtStartDate is changed, then the txtEndDate should should be updated. Likewise, if...

Disable button in WPF?

I have a button and textbox in my wpf app. How can i make button not enable until user enters some text in textbox? ...

Duplicate what is in the Textbox in other Textboxes on other sheets

I have four sheets in a spreadsheet. On each sheet there is a textbox. When I type in the textbox on sheet1, I want the textboxes on sheet2, sheet3, and sheet4 to populate with the same value. ...

WPF: How to programmatically remove focus from a TextBox

I want to add a simple (at least I thought it was) behaviour to my WPF TextBox. When the user presses Escape I want the TextBox he is editing to have the text it had when the user started editing, AND I want to remove the focus from the TextBox. I don't have any problem setting the text for the value it had in the beginning of the edit...

Hiding TextBox behind a DIV by using z-index property

Is there any way to hide the text box behind a DIV ? I have a textbox which is supposed to be disabled so that user can not change the text. But i have onclick() event on the same textbox. If i am using "disabled-disabled" then onclick event is not working. So, i am trying to make a DIV of same size with its z-index value higher then...

MS Access 2007 - Property for text box to allow end-user to hit enter for return, not next

So I have a form that user's use for data entry, and on one form there is a text box there that is basically used. To enter notes. However, if the user hits i need the cursor to stay in that text box, and start a new line (uh....like word would)....but currently it is jumping to the next control (text box). So is there a simple proper...

C# Winforms Textbox - Can I keep the selection when it loses focus?

I would like to have a regular textbox on my form, where the selected text is still highlighted even if you use another control, e.g. push a button. Does anyone know a way to achieve this (without using a RichTextBox which is not suitable for what I am doing). Thanks in Advance ...

Weird Textbox tab issue in asp.net page using 3.5 framework

I have a crazy issue when tabbing from one textbox to another. This happens on a webpage which contains about 20+ textboxes, and this happens on the same textboxes, and I have no idea what is the cause. When the cursor is in a textfield, I type in a value, hit tab, the focus goes to the next textbox, I hit tab, the focus stays in the s...

Silverlight Required TextBox Attached Property

I have a need to create an attached property for a TextBox, that enforces a rule that content is required. NOTE: Unfortunately I am not able to use data annotations, or SL4 validation frameworks. The textboxes are displayed within the context of a View. The View is reused in many places. When tabbing / clicking between TextBoxes within...

What is this called? And how to achieve it?

I would like to make a WRITE A NEW POST page similar to ASP.NET or how to make a page similar to http://stackoverflow.com/questions/ask Please note, I do not want reference to already made controls like free rich text editor, etc. I would like to do the required coding myself. I would also like to know what is the name given to thi...