Selecting a TabSheet with keyboard

Is it possible to select a TabSheet in a PageControl by using the keyboard?
Placing an underscore under a character on the TabSheet doesn't work.
rainbowsoftwareAsked:
Who is Participating?
 
rpetruniCommented:
You could use onKeydown event on the form (also form has to have KeyPreview set to true).
Here is sample code
if key=VK_F2 then PageControl1.ActivePage:=TabSheet1;

0
 
dwwangCommented:
You have to use the TAB key to set the focus on the page control, and the use left/right arrow key to go through the tabsheets.

Or use MyPageControl.activePage:=myTabSheet;
0
 
rwilson032697Commented:
You can also use CTRL-TAB and CTRL-SHIFT-TAB when on any control in a page in a page control.

Raymond.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.