textbox

How can I completely remove the Margin of textboxes in HTML/css

I have the following HTML <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title></title> <style> .box { border:solid black 1px; padding:0px; margin:0px; } </style> </head> <body> <form id="form1" runat="server"> <input class="box" style="width:300px;" /><br...

Why does 150 + 150 not equal 300 in browsers?

I have the following HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <style> .box { border:solid black 1px; padding:0px; margin:0px; } </style> <...

Howto bind TextBox control to a StringBuilder instance?

I would like several textboxes to react to changes of an underlying string. So if I were to change the content of the string, all those textboxes would change their content too. Now, I can't use the String type for that as it is immutable. So I went with StringBuilder. But the Text property of a TextBox object only takes String. Is the...

Redirect console output to textbox in separate program C#

I'm developing an Windows Forms application that requires me to call a separate program to perform a task. The program is a console application and I need to redirect standard output from the console to a TextBox in my program. I have no problem executing the program from my application, but I don't know how to redirect the output to...

Unicode characters not showing in System.Windows.Forms.TextBox

These characters show fine when I cut-and-paste them here from the VisualStudio debugger, but both in the debugger, and in the TextBox where I am trying to display this text, it just shows squares. 说明\r\n海流受季风影响,3-9 月份其流向主要向北,流速为2 节,有时达3 节;10 月至次年4 月份其流向南至东南方向,流速为2 节。\r\n注意\r\n附近有火山爆发的危险,航行时严加注意\r\n I thought that the TextBox supported...

How do I add a Microsoft AJAX auto complete textbox to an existing ASP.NET 3.5 SP1 web application project?

I played with this years ago when it was "atlas". Now I want to use it I assumed it would be a in the VS toolbox. Now all I can find on the web is total confusion! Thanks. ...

Visual Studio Text Box Wrap Function

How can I make my text wrap automatically to the next line when I am writing text in a textbox rather than keeps on typing in one line? ...

Value padded with spaces when displayed in dbaware textfield

Hi, I'm using ADO-components to connect to an access database. In a column defined as text with width 50, dataaware textfields always displays 50 characters even when the actual string value contains less characters. The value gets padded with spaces, and if the textfield is not wide enough, it looks like it is empty. Anyone got any cl...

What are standards for characters allowed in text fields

What are the typical characters allowed in text fields in a new user sign-up? Are there www standards? Especially interested in Username and Password character types allowed. ...

How do I make a textbox that only accepts numbers?

I have a windows forms app with a textbox control that I want to only accept integer values. In the past I've done this kind of validation by overloading the KeyPress event and just removing characters which didn't fit the specification. I've looked at the MaskedTextBox control but I'd like a more general solution that could work with pe...

WinForms Multiline Textbox, Enter key insists on moving focus out of textbox.

I've got a multiline textbox and a button below it. VB.NET, WinForms, .NET 2.0 System.Windows.Forms.Textbox Multiline = True AcceptsReturn = True AcceptsTab = False CausesValidation = False No Events explicitly coded. I'd like the Enter key to insert line-feeds and never move the focus to the next control (the button). I'd like ...

How does one databind a custom type to TextBox.Text?

I have a custom c# type like (just an example): public class MyVector { public double X {get; set;} public double Y {get; set;} public double Z {get; set;} //... } And I want it to databind to TextBox.Text: TextBox textBox; public MyVector MyVectorProperty { get; set;} //... textBox.DataBindings.Add("Text", this, "MyV...

Inherits from TextBox in WPF

Hello, I am trying to create a new WPF control called NumericTextBox. It inherits directly from TextBox. I added a new DependecyProperty called NumericValue that it could be used to bind a numeric property. Now, I would like to override the behavior of the TextProperty so that it could be accessed only as ReadOnly. Is it possible ...

Push data back from control to source without Validating event

I have TextBox controls on a WinForm bound to a BindingSource. If I set CausesValidation = false on these controls it doesn't update data source on tableAdapter.Update() method. I know that Control.Validating event does this saving but how can I update source if CausesValidation is disabled? ...

In XAML how to say: default width and height for e.g. TextBox

So I'm coming at WPF from a HTML perspective. I just want to put a Textbox on my Window like this: <Grid> <TextBox Name="theName" /> </Grid> Turns out that the TextBox is then HUGE, covers the whole window. (!) Ok, that's not what I want, but I don't want to define the EXACT size either since I know height and width should be fl...

Numeric TextBox

Hi, Im new to programming and I dont know very much about but I'm making a calculator, and i want to use a textbox that only acepts numbers and decimals, and when the user paste text from the clipboard the textbox deletes any literal characters, like the MS calc. Please take the time to explain each part so I can learn or write it and ...

Set cursor position in html textbox

Does anybody know how to move the cursor in a textbox to a particular position? For example if a textbox (e.g. input element, not textarea) has 50 characters in it and I want to position the cursor before character 20, how woould i go about it? Jon ...

How can I dynamically change auto complete entries in a C# combobox or textbox?

I have a combobox in C# and I want to use auto complete suggestions with it, however I want to be able to change the auto complete entries as the user types, because the possible valid entries are far too numerous to populate the AutoCompleteStringCollection at startup. As an example, suppose I'm letting the user type in a name. I have...

WPF Custom TextBox

Hi im making a custom Textbox i got everty thing working but how do i change the color of the I that blinks when a textbox has focus? ps the the text is inside a ScrollViewer with the property x:Name="PART_ContentHost" Ps this is my first wpf application so im not so good yet... Image ...

Generate a comma delimited string from items in a HTML List Box (multiple select) with Javascript

So if you have a html List Box, also called a multiple select, and you want to generate a comma delimited string that lists all the values in that List Box you can you can do that with the following example. The list_to_string() js function is the only important thing here. You can play with this page at http://josh.gourneau.com/sandbox...