Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In my project I have combobox for font types and simple button. If the button clicked the focus is set to the combobox and open it, like this :

private void button_Click(object sender, EventArgs e)
       {
                      Mycombobox.Focus();
                      Mycombobox.IsDropDownOpen = true;

       }


After the combobox is opened, the user start navigate the items using arrows and click Enter to select the wanted font type to apply it on selected text.

My wish is instead using the default Enter key or mouse to select the font to be applyed on highlighted text, I want directly use the arrows keys for both navigation and same time selection, for example, I highlighted some text then i open the combobox and I use the arrows keys (up and down) to navigate the items of the combobox ( fonts types: Arial, Verdana..)and while I'm navigating I see the changes applyed immediatly on the highlighted text I don't need to press Enter or mouse to see changes been applyed.
How I can do that? any help please
(sorry for my English!)
Posted

1 solution

Have a look at this post.

Once you have implemented an event for key stroke, you can write logic to refresh your UI based on this stroke.
 
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