Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#2.0 C#3.0 VS2008 C# C#4.0
Hi everyone,
I am trying to copy the intellisense of Visual Studio 2008. I have a big text box so called "textBox1" and a comboBox named as "comboBox1". I want that when i press space in my textbox the combobox must appear and when i press any of the arrow keys they must be utilized to iterate the selected items of combobox not for moving cursor up and down in lines of text box. But when combobox is not visible then they must be utilized to move up and down in lines of textbox.
 
How can i do so can anyone help me?
Thanks,
Akkywadhwa
Posted 4-Dec-12 8:13am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Taken this is Windows Forms, you could utilize for exampleKeyDown[^] event to implement desired functionality.
 
By using the Handled property of the event arguments, you can choose whether to let navigation keys to move on the lines of the textbox or not.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 4-Dec-12 18:56pm
   
Right, a 5.
--SA
Mika Wendelius at 4-Dec-12 23:23pm
   
Thanks :)
Akkywadhwa at 5-Dec-12 8:47am
   
How Can i disable the o let navigation keys to move on the lines of the textbox????????
Mika Wendelius at 6-Dec-12 12:18pm
   
You can check which key is pressed based on the information in the event arguments and then set Handled property as needed (depending on the key).

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

  Print Answers RSS
0 DamithSL 265
1 CPallini 235
2 OriginalGriff 233
3 Maciej Los 175
4 George Jonsson 170
0 OriginalGriff 5,305
1 DamithSL 4,382
2 Maciej Los 3,760
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,901


Advertise | Privacy | Mobile
Web02 | 2.8.141216.1 | Last Updated 4 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100