Click here to Skip to main content
15,881,559 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hi all dev
i have a multiline textbox in my form.
how can i send focus to next line of it by pressing a keyboard key like Enter key??????????????
thank you all
Posted
Comments
Sergey Alexandrovich Kryukov 16-Aug-12 2:46am    
First of all, you need to give us exact type of TextBox. There are several type with similar name.
--SA
daghune 16-Aug-12 2:48am    
A ((textbox)) that is multiline,not masked,a normal textbox
Sergey Alexandrovich Kryukov 16-Aug-12 13:22pm    
Do you understand English + C#?! "textbox" is not a type, and "TextBox" is also not a type. There is a number of different types under this name. Which one, exactly?
--SA
Sergey Alexandrovich Kryukov 16-Aug-12 13:24pm    
Oh, by the way, I answered generally, regardless to exact type. Does it make the issuer clear? A simple thing, really.
--SA

1 solution

This is not the focus! This is selection.

So, the idea is: set SelectionStart at the start of the range to be selected, SelectionLength to the number of characters to be selected. Too bad you did not provide exact full name of the class you are interested on, did not provide a link (please see my comment to your question). Look at your class by yourself and find there properties. Depending on the type, the properties can be exactly these, or something similar.

Next time, specify the type exactly, or tag the UI library you want to use or application type, but better all of the above.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900