|
-
Jan 28th, 2005, 01:06 PM
#1
Thread Starter
Member
MouseWheel event doesn't fire on TabPage
I have some controls on a tabPage (tabControl control) so that I have there a scroll bar. When I run my program, mouse wheel doesn't work. I added tabPage1_MouseWheel event to see if it is firing up, but it is not.
I need your help to fix it or explain it.
Thanks.
Victor
-
Feb 12th, 2005, 06:41 PM
#2
Re: MouseWheel event doesn't fire on TabPage
 Originally Posted by vkuzmich
I have some controls on a tabPage (tabControl control) so that I have there a scroll bar. When I run my program, mouse wheel doesn't work. I added tabPage1_MouseWheel event to see if it is firing up, but it is not.
I need your help to fix it or explain it.
Thanks.
Victor
umm the event wont fire unless tabPage1 or a control in tabPage1 is the control which has the focus. I'm not really sure what a good solution to this would be, but what I thought of is to manually set the focus on tabPage1 as the mouse enters it.
Code:
private void tabPage1_MouseEnter(object sender, System.EventArgs e)
{
foreach (Control ctrl in tabPage1.Controls)
{
if (ctrl.Focused)
return;
}
tabPage1.Focus();
}
what this does is that it checks to see if any control in tabPage1 has the focus, if so then do nothing because the mouseWheel event should fire. It not, then set the focus on tabpage1
not the best solution in my opinion, I just dont know any other way
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|