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

problem with textbox

Hi again,
I have a textbox where the text is longer than the textbox width. When I
type something in there or even do any single keystroke (other than tab, up,
down, or enter) and then leave, the beginning of the string shows, and focus
goes on to the next box. But if I just tab through or want to go straight to
the next textbox, the beginning of the string is cut off, leaving the end of
the string visible.
More info that may/may not be helpful:
When the textbox is initially entered, I highlight the entire string using
selectionstart = 0, selectionlength = textbox.text.length, textbox.focus;.
In my FocusLeave event, I do use textbox.SelectionStart = 0;, but it only
works if there's that other kind of keystroke (like "a" or left arrow).
Any suggestions???
Thanks again,
Mel
Dec 14 '05 #1
1 2018
Hi Mel,

I may be a little confused with your exact problem, I'm not sure what you
mean by the focus leave event only working when there is a keystroke such as
left arrow or "a". Does this mean when you do something like enter a longer
string than the width, and then tab away from the textbox it is not returning
to the beginning of the string? What I did was implement the Leave event and
had it set the selectionstart to 0. This did work for me in a situation
where I tabbed away from the textbox or selected another control with the
mouse. Hope this helps!

"melanieab" wrote:
Hi again,
I have a textbox where the text is longer than the textbox width. When I
type something in there or even do any single keystroke (other than tab, up,
down, or enter) and then leave, the beginning of the string shows, and focus
goes on to the next box. But if I just tab through or want to go straight to
the next textbox, the beginning of the string is cut off, leaving the end of
the string visible.
More info that may/may not be helpful:
When the textbox is initially entered, I highlight the entire string using
selectionstart = 0, selectionlength = textbox.text.length, textbox.focus;.
In my FocusLeave event, I do use textbox.SelectionStart = 0;, but it only
works if there's that other kind of keystroke (like "a" or left arrow).
Any suggestions???
Thanks again,
Mel

Dec 15 '05 #2

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

Similar topics

12
by: Peter Proost | last post by:
Hi group, I've got what seems a simple problem, but I can't find the solution. I've got a textbox and a handheld scanner to scan barcodes, the scanner just generates keypresses like a keyboard...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
30
by: dbuchanan | last post by:
ComboBox databindng Problem == How the ComboBox is setup and used: My comboBox is populated by a lookup table. The ValueMember is the lookup table's Id and the DisplayMember is the text from a...
12
by: Joel Byrd | last post by:
I'm having a little problem with using type-ahead functionality for an auto-suggest box. Sometimes, when I start to type something and the type-ahead shows up, the AJAX will send a request query...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
2
by: DC | last post by:
The Code <%@ import namespace="System" %> <%@ import namespace="System.Web" %> <%@ import namespace="System.Web.UI" %> <%@ import namespace="System.Web.UI.HtmlControls" %> <%@ import...
1
by: Werner Schmidt | last post by:
Dear group, I have a very strange behaviour: In a loop there are several TextBoxes initialized: TextBox objTextBox = null; // one declaration for-loop // multiple initialisations
0
by: sjickells | last post by:
Hi I am having a problem using asp:TextBox's in a transparent table. I have a background image on the page and a table in the middle of the page. I have set the background colour of the table...
4
by: pankajsingh5k | last post by:
Hi guys, These question is for all the experts... Please help me before my brain explodes The problem is again with the formview control.. I have a formview and i have to use it that...
2
by: pankajsingh5k | last post by:
Dear All, Please help me... I had read an article to lazy load a tab in a tabcontainer using an update panel on http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html ...
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
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...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: 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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.