473,405 Members | 2,210 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,405 software developers and data experts.

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 2199
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.com> wrote in message
news:eF**************@TK2MSFTNGP09.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.com> wrote in message
news:eF**************@TK2MSFTNGP09.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.WebControls.TextBox.

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***@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.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.WebControls.TextBox.

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***@discussions.microsoft.com> wrote in message
news:70**********************************@microsof t.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
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...
1
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...
1
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...
1
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...
11
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...
7
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...
29
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...
8
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...
7
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
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
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
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,...

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.