Forum Discussion

Morgan's avatar
Morgan
Frequent Contributor
14 years ago

Setting focus to a tab

Hello,



I am using the following to click the tab with the tabindex of 1 :

TabControl.TabIndex = 1



While this does work, in this case I am noticing that when the tab appears, it is not being loaded quite right so that the associated objects are enabled.  Only when I manually click the tab do the objects on that tab show as enabled.  The focus isn't to the tab itself, it appears.



How can I get this to work?  I've played around with it but am not having any luck.



Thanks,

Morgan

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It sounds like there are some items on the tab that are triggered by an "OnClick" event handler.  You might want to investigate if there's a way for you to call that Onclick method directly (like call DoOnClick or something like that).