PC Review


Reply
Thread Tools Rate Thread

How can I make the cursorready inside the lit Box?

 
 
Allen
Guest
Posts: n/a
 
      24th Sep 2009


--------------------------------------------------------------------------------

I have a list box ready to collect information from the users. I noticed
that; every time the users need to enter something they have to use the
mouse to set the cursor inside the box. How can I set the cursor ready
inside the list box so that the users do not have to use the mouse very time
they want to enter something?
empNumBox->Text = " ";


--
Thanks
Allen

 
Reply With Quote
 
 
 
 
Andrew Morton
Guest
Posts: n/a
 
      24th Sep 2009
Allen wrote:
> I have a list box ready to collect information from the users. I
> noticed that; every time the users need to enter something they have
> to use the mouse to set the cursor inside the box. How can I set the
> cursor ready inside the list box so that the users do not have to use
> the mouse very time they want to enter something?
> empNumBox->Text = " ";


<script type="text/javascript">
//<![CDATA[
document.getElementById('<%=yourListBox.ClientId%>').focus();
//]]>
</script>

Or, IIRC, there is now something in the framework to do that too. Oh, 30
seconds later, here's the example from the help:
Protected Sub Page_Load(ByVal sender As Object, _
ByVal e As System.EventArgs)
TextBox1.Focus()
End Sub

(Don't forget to set the tabindex for input elements.)

Andrew


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Make a text box fit the value inside *Glen* Microsoft Access Reports 4 10th Dec 2009 09:48 PM
WindowsFormsHost: how to make it to be draggable inside the canvas Lily Microsoft C# .NET 2 15th May 2009 07:53 PM
WindowsFormsHost: how to make it to be draggable inside the canvas Lily Microsoft C# .NET 0 14th May 2009 02:49 PM
How do I make changes only to a certain text font inside a documen Mekalor Microsoft Word Document Management 1 8th Feb 2009 06:16 PM
make notecards two per page inside and outside =?Utf-8?B?UnV0aGll?= Microsoft Word Document Management 1 11th Nov 2007 08:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:07 PM.