473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

WinApp: Navigate TabPage using custom keys

31
Hi!

I'm using arrow keys to navigate thru controls and I want my tab control to
implement that feature too, so when tabpage gets entered (focus is on the
header) DOWN key should focus on first tabpage control. Now, how can it
be achieved? I used to navigate using my utility classes, but recently
discovered that SendKeys.Send("{TAB}") works fine too on most controls. Can
I use it on tab too?

thnx,
M.
Nov 23 '07 #1
4 1632
Shashi Sadasivan
1,435 Expert 1GB
Hi!

I'm using arrow keys to navigate thru controls and I want my tab control to
implement that feature too, so when tabpage gets entered (focus is on the
header) DOWN key should focus on first tabpage control. Now, how can it
be achieved? I used to navigate using my utility classes, but recently
discovered that SendKeys.Send("{TAB}") works fine too on most controls. Can
I use it on tab too?

thnx,
M.
Hi,
Glad to see someone in the same mess as me. (using custom navigation keys)
Well...If you use the {TAB} with the tabControl focused, it will go onto the next control (which will obviously not be the next tab page)
Tab pages are scrolled using the arrow keys (left and right) so you would have to send the arrow keys, but then someone has to make the decesion on which keys will those be, or commit to selecting tab pages using the mouse.

However, you could create chortcut keys (Alt+1 for tabpage1, and so on). This may be easier

I convinced them to use the mouse for tab selection , So i havent had the need to implement that as yet.
Nov 23 '07 #2
Mecena
31
:) Hi!
Selecting tabpages is not the issue, selecting controls is. If my focus is on the tabpage header, {TAB} gives me the first control, which is fine. But when i focus on the first control, things get messy because i'm handling the tabcontrol's KeyDown which i cannot use since i'm handling KeyDown in my controls already. So what i need is some kind of a check to see if the tabpage header is actually focused, not the whole tabpage. Or some other idea?
M.

Hi,
Glad to see someone in the same mess as me. (using custom navigation keys)
Well...If you use the {TAB} with the tabControl focused, it will go onto the next control (which will obviously not be the next tab page)
Tab pages are scrolled using the arrow keys (left and right) so you would have to send the arrow keys, but then someone has to make the decesion on which keys will those be, or commit to selecting tab pages using the mouse.

However, you could create chortcut keys (Alt+1 for tabpage1, and so on). This may be easier

I convinced them to use the mouse for tab selection , So i havent had the need to implement that as yet.
Nov 23 '07 #3
Shashi Sadasivan
1,435 Expert 1GB
:) Hi!
Selecting tabpages is not the issue, selecting controls is. If my focus is on the tabpage header, {TAB} gives me the first control, which is fine. But when i focus on the first control, things get messy because i'm handling the tabcontrol's KeyDown which i cannot use since i'm handling KeyDown in my controls already. So what i need is some kind of a check to see if the tabpage header is actually focused, not the whole tabpage. Or some other idea?
M.
I thought you answered yourself there.
You need to check if the tabcontrol is selected n the tabcontrols keydown event

So in the tabControls keydown event check if the tabcontrol is focused, if yes then continue, else dont handle the keys
Nov 23 '07 #4
Mecena
31
wow. I thought I tried that one, but obviously haven't:) thanx, that was an eye opener right there:)


I thought you answered yourself there.
You need to check if the tabcontrol is selected n the tabcontrols keydown event

So in the tabControls keydown event check if the tabcontrol is focused, if yes then continue, else dont handle the keys
Nov 23 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: skipc | last post by:
Hi, I am stuck... I've got a popup window that displays a list in table format with links on the bottom to navigate the list <prev> 1 2 3 ... <next> When I demo'd to the users... they...
2
by: meh | last post by:
I'm not sure if I have the right concept going. I am making a custom TabPage and executing it from a button click event. It works fine I'm just thinking I might be missing the finer points of the...
1
by: RA | last post by:
Hi 1) I want to create a TabPage class in design mode - how do I do it? What type of project should I use? Is it going to be a custom control? 2) I have a TabControl that I would like to add to...
8
by: Andre Nogueira | last post by:
Hi there. I would like to know it is possible in VB.Net 2003 to see that a user has clicked a tab page. My goal is to close the tab page if the user clicks a tabpage "separator" (not sure how to...
4
by: Sam | last post by:
Hi, I need to add programmatically several tabpages to a tab control. Those tabpages are all the same (i.e they contain a textbox and a listbox, and a button). How can I create my own tab...
0
by: TCook | last post by:
Hello All, I have a custom tabcontrol that is not displaying correctly. If I use the custom collection sample from the following website: http://dotnetrix.co.uk/tabcontrols.html The pages...
2
by: Rex the Strange | last post by:
I suspect the answer to this question is "you can't," but here goes anyway: I have a tabcontrol which contains, of course, various tabpages (added programmatically at runtime, but this is...
6
by: =?Utf-8?B?U2hhcm9u?= | last post by:
Hello gurus, I want to have a Form with a TabControl, this TabControl will contain TabPage that has controls in it, this TabPage is prepared at design time. I want in runtime to duplicate the...
0
nev
by: nev | last post by:
I know when is best to use some templates but listed below are most that I don't know when is best to use or even know how to use: I am creating a windows application with mysql backend. 1....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.