473,788 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question re Textbox Component

Is there a way from a textbox that you can establish the maximum length
of the text that will be displayed in the textbox on the screen.

What i am not requring is the Max Length of the Textbox but the Maximum
Displayed Length.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
6 2238
You can use the Columns property to set the displayed length of the textbox

Manoj

"Stuart Ferguson" wrote:
Is there a way from a textbox that you can establish the maximum length
of the text that will be displayed in the textbox on the screen.

What i am not requring is the Max Length of the Textbox but the Maximum
Displayed Length.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2
You can use the Columns property to set the displayed length of the textbox

Manoj

"Stuart Ferguson" wrote:
Is there a way from a textbox that you can establish the maximum length
of the text that will be displayed in the textbox on the screen.

What i am not requring is the Max Length of the Textbox but the Maximum
Displayed Length.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #3
Hello

No, there is no. You can create your own derived class which implements the
functionality. It will keep the original string in its private member and it
will set only a portion of it to Text property of the textbox.
--
With best regards,
Andrew

http://www.codeproject.com/script/pr...asp?id=1181072
"Stuart Ferguson" <st************ **@btinternet.c om> wrote in message
news:eF******** ******@TK2MSFTN GP09.phx.gbl...
Is there a way from a textbox that you can establish the maximum length
of the text that will be displayed in the textbox on the screen.

What i am not requring is the Max Length of the Textbox but the Maximum
Displayed Length.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #4
Hello

No, there is no. You can create your own derived class which implements the
functionality. It will keep the original string in its private member and it
will set only a portion of it to Text property of the textbox.
--
With best regards,
Andrew

http://www.codeproject.com/script/pr...asp?id=1181072
"Stuart Ferguson" <st************ **@btinternet.c om> wrote in message
news:eF******** ******@TK2MSFTN GP09.phx.gbl...
Is there a way from a textbox that you can establish the maximum length
of the text that will be displayed in the textbox on the screen.

What i am not requring is the Max Length of the Textbox but the Maximum
Displayed Length.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #5
Columns property is only can be applied to
System.Web.UI.W ebControls.Text Box.

But for System.Windows. Forms.TextBox there is no such property.

More of it, Columns property is just for control's width setting. But you
can still scroll inside.
--
With best regards,
Andrew
http://www.codeproject.com/script/pr...asp?id=1181072
"Manoj Kumar" <Manoj Ku***@discussio ns.microsoft.co m> wrote in message
news:70******** *************** ***********@mic rosoft.com...
You can use the Columns property to set the displayed length of the
textbox

Manoj

"Stuart Ferguson" wrote:
Is there a way from a textbox that you can establish the maximum length
of the text that will be displayed in the textbox on the screen.

What i am not requring is the Max Length of the Textbox but the Maximum
Displayed Length.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #6
Columns property is only can be applied to
System.Web.UI.W ebControls.Text Box.

But for System.Windows. Forms.TextBox there is no such property.

More of it, Columns property is just for control's width setting. But you
can still scroll inside.
--
With best regards,
Andrew
http://www.codeproject.com/script/pr...asp?id=1181072
"Manoj Kumar" <Manoj Ku***@discussio ns.microsoft.co m> wrote in message
news:70******** *************** ***********@mic rosoft.com...
You can use the Columns property to set the displayed length of the
textbox

Manoj

"Stuart Ferguson" wrote:
Is there a way from a textbox that you can establish the maximum length
of the text that will be displayed in the textbox on the screen.

What i am not requring is the Max Length of the Textbox but the Maximum
Displayed Length.

Any help is appreciated

Stuart

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2980
by: Hal Vaughan | last post by:
I think a lot of this is definately a question of personal programming style, but I'm new to Java and would like to hear a few opinions. I'm writing a control panel for an application that runs separately. The control panel is basically (almost) fully self contained. It consists of a tabbed pane with 5 different tabs. Each tab has a number of different controls -- basically all the "commonly used" controls (buttons, lists, comboboxes,...
1
1162
by: viboater | last post by:
This may be a dumb question. Bear with me because I'm a driver guy. Anyway, I would like to put text, and/or HTML, and/or a hyperlink into a TextBox type of object. Any clues on how to use a TextBox object or browser object to accomplish this would be very much appreciated. Thanks
1
2327
by: Fraggle | last post by:
I have a repeater with controls added at run time. the <template> also contains a <asp:textbox that is made visible on some repeater elements. when I come to read the text info out it has disapeared. The read is done on a button click. I can read the selected items from the other controls in the repeater, demo page here
1
1182
by: Amit | last post by:
Hi All, In one of my web form we are using datagrid server control. There are 5 columns (Sr.No,ProductID,ProductName,Quantity,Rate) in the gird. In footer or edit template I used textbox and dropdownbox controls. What I want if user put some values in textbox (for ex. ProductID), ProductName automatic select in next column or if user select ProductName from DropDownlist ,the ProductID automatic display in Textbox. Productlist is bind with...
11
4580
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing opinion of how I want to handle the 'user experience' in the application I'm creating. While I know I could allow the user to enter in number and alpha text - in a text box - and then tell them when the execuate a command "This is not numeric data", I...
7
8702
by: DazedAndConfused | last post by:
Curently I manualy code keypress edits. i.e. allow only 3 digits before decimal and two digits after decimal in .NET. Is there an easy solution to mask text boxes? The MSMASK32.OCX from vb6 does not seem to be appropriate for a desktop application with textboxes not bound to a dataset, am I wrong? -- How time fly's when you don't know what you are doing!
29
3579
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this one data field - but i'm not sure) :-) Background info:
8
1208
by: Grant Merwitz | last post by:
hi I am using Javascript to do my validation This is so i can display a loading message after a form is submitted. Now, currently i do so like this. I have a button, textbox and label like so: <asp:textbox id="tb" runat="server"/>
7
1503
by: John D'oh | last post by:
Hello, I have been going through the MSDN Walkthrough: Creating a Windows Forms Control That Takes Advantage of Visual Studio Design-Time Features. Everything was going fine and I was able to create and compile the MarqueeControlLibrary project. And I think I even understood most of it.
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10172
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.