Board index » delphi » D2 - Ctrl Tab to new Tab in TPageControl within TTabbedNotebook

D2 - Ctrl Tab to new Tab in TPageControl within TTabbedNotebook

Hi,

I am experiencing some strange behaviour with  Ctrl Tabbing to the next
page in a TPageControl that resides within a TTabbedNotebook.

If I just have one TPageControl on a TTabbedNotebook page then the ctrl tab
works as desired but if I add a TPageControl to another notebook page then
ctrl tab affects the TPageControl on the wrong notebook page, confused ?
try this..

Add a TTabbedNotebook to a form with 2 pages, to each page add a
TPageControl with a couple of TTabSheets each, then run the application and
try to ctrl tab to the next TTabSheet.  For some weird reason the
TPageControl on the wrong TTabbedNotebook page advances.

Does anybody have a decent work around for this (I know the aesthetics of
tab's within tabs is an issue in itself , but that is my customers choice)
This app is a data entry app and the users really need to be able to
advance to the next page without using the mouse.

On a side note, does anybody know why a VK_TAB does not force a OnKeyDown
event? I can only seem to trap this key with OnKeyUp, but this is useless
to me.

Regards Tim Jarvis.

 

Re:D2 - Ctrl Tab to new Tab in TPageControl within TTabbedNotebook


On 14 Oct 1996 12:11:38 GMT, "Tim Jarvis" <t...@jarvis.com.au> wrote:

Quote
>Hi,

>I am experiencing some strange behaviour with  Ctrl Tabbing to the next
>page in a TPageControl that resides within a TTabbedNotebook.

>If I just have one TPageControl on a TTabbedNotebook page then the ctrl tab
>works as desired but if I add a TPageControl to another notebook page then
>ctrl tab affects the TPageControl on the wrong notebook page, confused ?
>try this..

>Add a TTabbedNotebook to a form with 2 pages, to each page add a
>TPageControl with a couple of TTabSheets each, then run the application and
>try to ctrl tab to the next TTabSheet.  For some weird reason the
>TPageControl on the wrong TTabbedNotebook page advances.

>Does anybody have a decent work around for this (I know the aesthetics of
>tab's within tabs is an issue in itself , but that is my customers choice)
>This app is a data entry app and the users really need to be able to
>advance to the next page without using the mouse.

>On a side note, does anybody know why a VK_TAB does not force a OnKeyDown
>event? I can only seem to trap this key with OnKeyUp, but this is useless
>to me.

>Regards Tim Jarvis.

I had what may be a similar problem with two tab sets.  They were each
on a different page of a notebook.  Next I set an accelerator key
(e.g. &Tab as the text for the tab, so the T is underlined) with the
same letter on both tab sets.  When the accelerator was pressed, the
tab was pushed on the notebook page _other_ than the one which was
being currently viewed.

I got round it by creating a TabSetChange event on each tabset.  This
checked which notebook page was active, and in the appropriate
circumstances set AllowChange to False and presses the tab on the
_other_ notebook.

Francis

Other Threads