Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't seem to access mmTabControl click event
Message
 
To
29/09/2004 09:45:15
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00947153
Message ID:
00948563
Views:
20
Tony,

>When I drop down one of my Form's control list I don't see the mmTabControl on it.
>
>What I want to do is to access the click event of a tab so that I can change the title of the form based in the tab I click.
>
>Can you tell me how I can do this with the mmTabControl?

There's a bug with VB .NET that causes this problem (it's fixed in VS 2005). Normally, to create an event handler you select a control from the top-left combo box in the VS .NET IDE and select the event to handle in the top-right combo box. However, if the control is inherited from the base form it doesn't show up in this list. For inherited controls, you must manually create the event handler in VB .NET. For example, to create an event handler for an inherited TabControl, you can add a handler method to your form like this:
Private Sub TabControl_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)

End Sub
Then in your form's constructor, add code that registers the event handler with the associated event. For example:
AddHandler TabControl.SelectedIndexChanged, AddressOf Me.TabControl_SelectedIndexChanged
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform