473,398 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Detecting mouse clicks in the "empty" area of a WinForms TabControl

I've added a TabControl to my WinForms app, and added a couple of tabs to
the control.

The result is that the top strip of the TabControl contains the two tabs,
and then to the right of them is an empty area, above the tab content:
/ Tab 1 caption \ / Tab 2 caption \ XXXX empty space XXXX
I should stress that the empty space is within the bounds of the TabControl,
but there are no tab headers there to be clicked on. This is the space that
would be filled with the header for the third tab if I were to add one.

(I hope that makes sense!)

If I click in the empty space, no mouse events are fired by the TabControl.
This is a nuisance as I need to know that the user has clicked there. I get
mouse events when the user clicks on one of the tab headers, but not the
empty area.

Is there some way I can obtain mouse clicks for this area of the control?

--

(O)enone
Jun 27 '08 #1
1 1761
That area is not part of the control but rather the form (or other control
like a panel) behind it. The easiest way to handle this is probably dock a
tab control in a panel and handle the panels OnMouseClick event as you would
want to handle it.

"(O)enone" wrote:
I've added a TabControl to my WinForms app, and added a couple of tabs to
the control.

The result is that the top strip of the TabControl contains the two tabs,
and then to the right of them is an empty area, above the tab content:
/ Tab 1 caption \ / Tab 2 caption \ XXXX empty space XXXX
I should stress that the empty space is within the bounds of the TabControl,
but there are no tab headers there to be clicked on. This is the space that
would be filled with the header for the third tab if I were to add one.

(I hope that makes sense!)

If I click in the empty space, no mouse events are fired by the TabControl.
This is a nuisance as I need to know that the user has clicked there. I get
mouse events when the user clicks on one of the tab headers, but not the
empty area.

Is there some way I can obtain mouse clicks for this area of the control?

--

(O)enone
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Klaus Petersen | last post by:
Hi ng. I have a varchar field in my table, called Name. I wanna do a selection, which is ordered by whether this field is empty or not. E.g. something like: SELECT
4
by: Marcin Dobrucki | last post by:
I've been having some problems with a parse error that I can't figure out (PHP 4.3.11 on Solaris9). Sample code: <?php // getting strange parse errors on this class A { var $value; function...
8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
7
by: Brad | last post by:
When debugging my current web project, in VS2003, I found I had lost the ability to drill down on watch objects in the Watch Window; I could only view the single value specific watch objects. ...
0
by: Shan Plourde | last post by:
Hi everyone, I have been using various regular expressions with the ASP.NET RegularExpressionValidator for quite some time. In general it works very well. One of the common regex's that I use...
1
by: Alan Silver | last post by:
Hello, I have the following line of code in a script... litMsg.Text = Server.MapPath("/"); where litMsg is an ASP.Net Literal control. When I try and run this page, I get the error ... ...
10
by: mcbobin | last post by:
Hi, Here's hoping someone can help... I'm using a stored procedure to return a single row of data ie a DataRow e.g. public static DataRow GetManualDailySplits(string prmLocationID, string
10
by: arnuld | last post by:
this is from Steve Summit C notes: The empty pair of parentheses indicates that our main function accepts no arguments, that is, there isn't any information which needs to be passed in when the...
4
by: kang jia | last post by:
hi currently i am getting an array from database,the code is in the following, if id do not exist variable b will render an empty array. at this time, i would like to check if this array is empty...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.