954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Event Not Firing From Within A Tabbed Container

Hi all,

I'd appreciate if somebody could shed some light on the following;

I have a tabbed container, each tab has the same controls but for a different target.

I am using a timer to control when to fire each event from the 5 different tabbed controls, my problem is this.

The event only fires when the focus is on that specific tab.

So when an event on tab2 should fire, if i am looking at tab1 then tab2 event does not fire.

BUT if i am looking at tab2 when the event should fire, then it does happen.

I can't seem to find any information on what exactly i am overlooking.

Cheers,
Carl.

carlt
Newbie Poster
3 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

Could you show us your code and what events you are talking about?

GeekByChoiCe
Master Poster
721 posts since Jun 2009
Reputation Points: 208
Solved Threads: 168
 

Hi,

This is the code that fires a click event on buttons;

If Website1ImpactWhenListBox.Items.Contains(DaySecondsTimer) = DaySecondsTimer.ToString() Then
            Website1overideButton.PerformClick()
        End If
        If Website2ImpactWhenListBox.Items.Contains(DaySecondsTimer) = DaySecondsTimer.ToString() Then
            Website2overideButton.PerformClick()
        End If


Website1overideButton is located onTabPage1
Website2overideButton is located on TabPage2

If you need any further code to assist in your diagnosis please let me know.

carlt
Newbie Poster
3 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

Ok i was stupid!

I forgot to focus() on the tab i wanted.

TabPage1.Show()
            TabPage1.Focus()
            Website1overideButton.PerformClick()
            currentTab.Show()
            currentTab.Refresh()


Thank you for your assistance.

carlt
Newbie Poster
3 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: