473,396 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

limit input in textbox

Hai,
Is there any way to limit the input data to the width of of the textbox itself.
I don't want scroll data when user keyins. I don't want to use Max length concept because some times user may change font size, hence the number of characters may change. The reason is, i want to print this form with these textboxes after data entry If i enter the text more than my text box width, i can't get all the data in my output.

thanks
Raj
Jan 15 '07 #1
1 2231
Killer42
8,435 Expert 8TB
Hai,
Is there any way to limit the input data to the width of of the textbox itself.
I don't want scroll data when user keyins. I don't want to use Max length concept because some times user may change font size, hence the number of characters may change. The reason is, i want to print this form with these textboxes after data entry If i enter the text more than my text box width, i can't get all the data in my output.
Perhaps you could dynamically set the MaxLength property based on the results of the form's TextWidth method (set the form to the same font style as the text box).
Jan 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jesper Rønn-Jensen | last post by:
I have a textarea that must be limited to 70 characters. No big deal -- at least so I thought. * Textarea must not exceed 70 characters * Exceeding content must be cut off * Must work on input by...
2
by: Parintas Themis STE Kardias | last post by:
I have a textbox, and i wand to put a limit (for example only 8 characters) and if i entry characters not longer of 8 then add spaces for the rest of textbox characters
1
by: Luke Wu | last post by:
I have been using the getline function from K&R2 for simple character input. The prototype is int getline(char *s, int limit); /* returns 0 to signal EOF */ This function simply calls...
1
by: cw | last post by:
Hi all, Is anyone have an idea that limit message length input by user into textbox. I'hv tried the maxlength property by setting it to 150, but it seems like not working.., regards
5
by: ScareCrow | last post by:
How do I go about limiting a textbox to accepting numeric key input from the keyboard in vb.net? --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading...
27
by: Killer42 | last post by:
Hi all. Does a textbox on an Access form have an equivalent of the VB6 .MaxLength property? I need to limit the length of an input string. It's not bound to anything, just used in code, but I'd...
4
by: ad | last post by:
I want to limit the input of usr to 0..9 or a..z How can I do that?
2
by: Terry | last post by:
Hi, i want to limit input in this textbox up to 2O characters, but i can input a unlimited amount of characters. How to limit that? <asp:TextBox ID="txtStreet" runat="server" Width="200px"...
4
by: Alec MacLean | last post by:
Is anyone aware of a size limit imposed on the subject text when using the System.Net.Mail library? I'm getting problems of message not being recieved if the subject exceeds 15 chars. Thx
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.