473,796 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to select all in textbox?

I have a textbox with width of 504 and height 248. It gets filled with much
content so there is a vertical scroll bar present. When I click into this
box and do Ctrl + A, it should highlight everything. However, nothing
happens. I have to click into the box, hold down Shift and page down to get
everything. Is there a way to enable the select all option?

Thanks,
Brett
Nov 21 '05 #1
3 4086
Use a richtextbox

hth

Peter

"Brett" <no@spam.com> schreef in bericht
news:eX******** ******@TK2MSFTN GP12.phx.gbl...
I have a textbox with width of 504 and height 248. It gets filled with much content so there is a vertical scroll bar present. When I click into this
box and do Ctrl + A, it should highlight everything. However, nothing
happens. I have to click into the box, hold down Shift and page down to get everything. Is there a way to enable the select all option?

Thanks,
Brett

Nov 21 '05 #2
Brett wrote:
I have a textbox with width of 504 and height 248. It gets filled with much content so there is a vertical scroll bar present. When I click into this box and do Ctrl + A, it should highlight everything. However, nothing happens. I have to click into the box, hold down Shift and page down to get everything. Is there a way to enable the select all option?


Interesting. A plain textbox DOES respond to Ctrl-Z X C V (with the
usual Windows meanings), so those must be 'built-in' to the TextBox
control. But I suppose Ctrl-A is not 'Windows standard' enough to make
it.

To provide this functionality for a TextBox named txt :

Private Sub txt_KeyDown(ByV al sender As Object, ByVal e As
System.Windows. Forms.KeyEventA rgs) Handles txt.KeyDown
If e.Control And e.KeyCode = Keys.A Then
txt.SelectAll()
End If
End Sub

--
Larry Lard
Replies to group please

Nov 21 '05 #3
Sorry. It is a rich textbox.

"Peter Proost" <pp*****@nospam .hotmail.com> wrote in message
news:eP******** *****@TK2MSFTNG P15.phx.gbl...
Use a richtextbox

hth

Peter

"Brett" <no@spam.com> schreef in bericht
news:eX******** ******@TK2MSFTN GP12.phx.gbl...
I have a textbox with width of 504 and height 248. It gets filled with

much
content so there is a vertical scroll bar present. When I click into
this
box and do Ctrl + A, it should highlight everything. However, nothing
happens. I have to click into the box, hold down Shift and page down to

get
everything. Is there a way to enable the select all option?

Thanks,
Brett


Nov 21 '05 #4

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

Similar topics

17
14650
by: Newbie | last post by:
Dear friends, I am having a hard time understanding how to use a SELECT CASE in ASP. I have used it in VB but never in ASP scripting. Scenerio: I have 2 textboxes on a form that I have to allow entry to one or the other or Both at the same time. Now I tried to use an If ElseIf but it got too hard to track, so now I am using a SELECT CASE Statement.
3
21726
by: Phill | last post by:
I thought when you tabbed into a textbox that the text it contained was automatically highlighted. This use to be the default in win32. Is there an easy way to do this in .NET. I don't want this to happen if the mouse is used to select the TextBox. Seems wierd, If the Textbox has the default text in it the higlight works but not if you edit it. Thanks.
1
1106
by: Lily | last post by:
Hi there, I have 10 textboxs on a page. When tab into a textbox, the entire text ($0.00) in a textbox is selected in blue. How do I have this effect by single clicking on the textbox?
1
2079
by: Mad Scientist Jr | last post by:
I'm stuck trying to work with a HTML <SELECT> control and javascript (similar to DualList but that control doesn't offer enough options to totally control the text on the buttons and control, also I don't have c# on this machine to try and modify it).. anyway... I'm trying to get javascipt to select all items in a <SELECT> control and submit the form to an asp.net page. For some reason when the link is clicked, you can see the items all...
3
30176
by: abc my vclass | last post by:
My win-form have many numericupdown controls to applied. But numericupdown control don't like textbox, text box control can automatic selected text when got focus. Is there any method can let me set all numericupdown autoselect text when gotfocus?
2
11060
by: Atreju | last post by:
Ok I got form within a c sharp page. Situation: On the form I have a drop downliwst and a textbox, the dropdownlist is populated with products and the textbox has a default vale of the product price. Problem: The first item prce in the dropdownlist is populated in the textbox. When I select another product from the dropdownlist the value within the
4
8682
by: Dabbler | last post by:
Is there a way to mark the text in a TextBox control as selected so when the user types a new value the existing text is replaced? Thanks
13
5801
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table CatalogImage where imgID also needs to be placed. Below is my code behind to carry the catID using the Select @@Identity and insert imgID to the bridge table. No data is being entered into the bridge table.
1
3239
by: billypit | last post by:
Hi, I am totaly new to MS Access. I have one form in MS Access in which i want that whenever i select an item from combobox then in the textbox on the same form or subform i want value from table based on selection from combobox. like in my table there two fields ID,name 1 billy 2 sandy
0
9685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9535
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
10244
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...
1
7558
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6802
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
5454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4130
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
3
2931
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.