I don't know if it's a bug. I think not, but it's pretty annoying...
In your sample the TabStrip control raises events like Click, MouseDown, etc. But when I add a second tabstrip to it (or to a completely new project), I do not get any events for the control that I have added, and I just can't figure out what I'm doing wrong.
Hans
TabStrip doesn't raise events
Re: TabStrip doesn't raise events
Have a look at the property DisabledEvents (also configurable at design time via the property pages). Most events are disabled by default to increase performance.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: TabStrip doesn't raise events
Thanks!
I didn't know that it wouldn't show up in the properties (I don't mean the property sheet) and that it could only be accessed by property sheet or by code.
I don't know about others, but to me a TabStrip without click events is useless (I need an event in which I can set .ZOrder for my pictureboxes), that's why I am wondering why you chose to not set having events as a default).
I believe you had your reasons, but it's not comfortable.
Hans.
I didn't know that it wouldn't show up in the properties (I don't mean the property sheet) and that it could only be accessed by property sheet or by code.
I don't know about others, but to me a TabStrip without click events is useless (I need an event in which I can set .ZOrder for my pictureboxes), that's why I am wondering why you chose to not set having events as a default).
I believe you had your reasons, but it's not comfortable.
Hans.
Re: TabStrip doesn't raise events
The Click event isn't what you're looking for. It is raised if the user clicks anywhere on the control. It is NOT raised if the user activates another tab (which also can be done by code or by keyboard).
You should use the ActiveTabChanged event, which never is disabled.
You should use the ActiveTabChanged event, which never is disabled.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!
Re: TabStrip doesn't raise events
Hello!
I made a few mistakes... I have to admit it!!
I see that by default all events are enabled (looking at the property sheet), so please accept my apologies...
Out of interest... how would I trigger a Click event? I click everywhere on the TabStrip, but nothing happens. Not that I need this event (thanks so much for your explanation on the ActiveTabChanged), but I wonder how it can ever be raised.
Hans
I made a few mistakes... I have to admit it!!
I see that by default all events are enabled (looking at the property sheet), so please accept my apologies...
Out of interest... how would I trigger a Click event? I click everywhere on the TabStrip, but nothing happens. Not that I need this event (thanks so much for your explanation on the ActiveTabChanged), but I wonder how it can ever be raised.
Hans
Re: TabStrip doesn't raise events
No, that's not right. The property is called DisabledEvents. So any event in the list that is checked, is disabled and not enabled.TickTick wrote:I see that by default all events are enabled (looking at the property sheet)
Remove the check mark next to "Click events". Then it will work.TickTick wrote:Out of interest... how would I trigger a Click event? I click everywhere on the TabStrip, but nothing happens. Not that I need this event (thanks so much for your explanation on the ActiveTabChanged), but I wonder how it can ever be raised.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Boycott DRM! Boycott HDCP!