473,698 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to highlight text in a TextBox without setting focus on it?

8 New Member
Hi everyone,

Is it possible to highlight (a portion of the) text in a textbox without setting focus to it. What I'm interested is marking some portion of the text for reference while my cursor is still inside some other control.
Aug 24 '09 #1
3 3992
ADezii
8,834 Recognized Expert Expert
@geosmy
Is it possible to highlight (a portion of the) text in a textbox without setting focus to it.
To the best of my knowledge, this simply cannot be done.
Aug 24 '09 #2
geosmy
8 New Member
All I am looking is to emulate the behaviour of the built-in Seach Textbox in Access 2007 forms.

In this Textbox as one types Access marks in real time the first occurence of the search string inside the form fiels. This is done without losin focus on the search textbox and without the cursor leaving it.

Alternatively are there any available classes out there that customise this search textbox?
Aug 25 '09 #3
FishVal
2,653 Recognized Expert Specialist
If you are using A2007, then you may utilize rich text mode available for Textbox control in A2007.
Aug 25 '09 #4

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

Similar topics

1
5003
by: Gerg | last post by:
The datagrid has a tablestyle applied to it, and there are DataGridTextBoxColumn and each DataGridTextBoxColumn has an array of DataGridTextBox objects. Private Sub highlight(ByVal str As String) Dim myTextBoxcolumn As DataGridTextBoxColumn Dim myTextBox As DataGridTextBox 'loop through the cells of the datagrid, searching for the string
4
10234
by: Jeff Bangert | last post by:
How to turn it off? For example, this code TextBox1.Text = "hello"; puts "hello" in the TextBox, but it is highlighted. I want to turn off the highlighting. I have looked at every TextBox design property.
10
9129
by: mg | last post by:
I want to enter characters in a TextBox in a WebForm, press a Button in the WebForm, and read the characters that were typed into the TextBox from within the Button_Click event handler. The main point here is that I want to read the value typed into the TextBox without hitting the Enter key or setting focus on another control ...
2
1999
by: parm | last post by:
How do I highlight text in my first (tabindex = 1) asp control (eg: textbox) on the webform on page load. If I try to set focus using javascript then I get script error "Cannot move focus to invisible control)". Because the tabindex of first control is 1 therfore I can get the focus on first control but the text inside is not highlighted. Any help would be greatly appriciated. My set focus javascript: Public Sub SetFocus(ByRef MyPage As...
5
7298
by: marfi95 | last post by:
I'm very confused. I'm trying to automatically select the text when my textbox gets the focus. This is typically when the user has clicked the mouse in the field. This is the code I have in the Text1_GotFocus event: Text1.SelectionStart = 0 Text1.SelectionLength = Text1.Text.Length However, the text does not get highlighted. It appears to be the
1
9886
by: John | last post by:
Hi, When a textbox gets focus in WinForm, the text inside the textbox is highlighted with default color. How can I get the value of the default highlight color like the following? Dim BackColor as Color = MyTextBox.BackColor Dim ForeColor as Color = MyTextBox.ForeColor ' And hopefully I can use something like the following: ' Dim HighLightColor as Color = MyTextBox.HighlightColor
2
1243
by: clickon | last post by:
I have posted this question 3 times now and no-one has even answered it, so is it possibly a bug or am i missing something. In short it does not seem to be possible to set the focus on control from within the Active event handler of the WizardStep control. Full details below. For testing purposes i have got a 2 step WizardControl. Eqach step contains a text box, TextBox1 and TextBox2 respectively. If i put the following code in the...
13
3368
by: WALDO | last post by:
I have a .Net TextBox (TextBoxBase, really) in which I am appending about 20 lines of text per second. I use the AppendText() method to accomplish this. This is a great substitute for taking the Text property and concatenating it... Me.tb.Text &= newText ' Instead use Me.tb.AppendText(newText) ....ultimately setting the SelectionStart to the end of TextBox, the
1
5857
by: dana1 | last post by:
I have a form with several combo boxes in the header used to determine the records that will be displayed on the form. When I tab or enter from the last combo box in the header, I want the focus to move to the first control on the form. When I Shift+tab from the first control on the form, I want the focus to move to the last control in the header. The form is a continuous form. The first control on the form is either a text box or a combo...
0
8598
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
9152
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
9016
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
8856
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6515
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
5858
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
4360
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
4613
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1997
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.