473,320 Members | 1,572 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,320 software developers and data experts.

Setting up Text Boxes

I have a Text Box in my program that takes user input , it has multiline set
to true , and will automatically clear the text box when the enter key is
pressed (after passing it to another "engine" class to do some processing
with) , however when the box is cleared with either the Clear() method OR by
setting Text = "" the cursor position will not return to the start of the
box , leaving the user to do this manually which is obviously not ideal.

Another part of my form displays output from the "engine" class , this is
rendered in a textbox , however i do not want the user to be able to type
into this textbox , so I set ReadOnly = true , however this makes the
background to the box white where it would fit in with the look and feel of
the application to have it white and it doesnt seem to let me change it....

Im using Visual Studio 2002 Pro (if that makes any difference)

Ideas anybody?
Nov 13 '05 #1
1 3092
> however when the box is cleared with either the Clear() method OR by
setting Text = "" the cursor position will not return to the start of the
box , leaving the user to do this manually which is obviously not ideal.
You can use the Select() method of the textBox:
textBox1.Select(0, 0);

or the Selection* properties to do the same thing.
into this textbox , so I set ReadOnly = true , however this makes the
background to the box white where it would fit in with the look and feel of the application to have it white and it doesnt seem to let me change

it....

But it is consistent with the look and feel of Windows, which is more
important.

To work around this (if you must), just set the BackColor to white:
textBox1.ReadOnly = true;
textBox1.BackColor = Color.White;
Nov 13 '05 #2

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

Similar topics

1
by: Jim Quast | last post by:
I have an ASP page and a CREGReports002.vbs file coded to export data to excel. I do this by building variables in a stored procedure. The ASP page has text boxes, list boxes, and radio buttons. ...
2
by: Ron L | last post by:
I am attempting to set up a datagrid that will 1) display a subset of data from a SQL Stored Procedure in a different order form how SQL returns it, and 2) display 3 of the columns using pulldowns....
0
by: johnnyD | last post by:
I am creating a page which displays a customers billing history. As such it uses a datasource which queries the billing table. This works fine, and outputs desired information I need. I need the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.