473,505 Members | 13,982 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tool Tip for disabled control

I didn't know what to put for a subject, so I just tell you a problem
requirement they want for my ap. If the user hovers over a disabled control,
they want a text bubble to explain why it's disabled. (This does not seem
unreasonable. There are tool tip bubbles coming up on the disabled toolbar
buttons on my email reader right now.)

Now the ToolTipProvider will not show a tip on a disabled control. Okay I
don't mind programming my own, but you don't get any events to react to
from a disabled control (do you? just one?) So how am I supposed to know
when to show this text? I'm trying to fake out being disabled by having a
usercontrol with a "fake disabled" property that will disable all the child
controls, but the UserControl can still receive events. This is not great,
though -- anyone know of any other way?

The problem with this UserControl fake is, well...
I don't want to respond to most events when it's disabled. I just want a
"mouse hover" or enter/leave or something.) For everything else, I have to
put "if (!fake_disabled)" around the whole thing. (This is a big deal
because pretty much all the controls we will use are of this nature, and
we're talking many many textboxes and checkboxes and buttons on many many
forms. That's thousands of events with this extra line of code we have to
type in every one.) Is there any possible way I could do something in the
UserControl to avoid dealing with all those events I don't want to respond
to when fake_disabled, and only allow the one I do want?

Thanks if you have any help at all...
-Rachel
Nov 16 '05 #1
3 11321
When a control is disabled no mouse or keyboard input is passed to the
window. Instead if the window is a child then message is sent to the parent.
So you can catch the fact that the mouse is over a disabled control in the
parent (Form) and handle tips manually knowing that.

Regards
Lee Alexander
..
"Rachel Suddeth" <ra****@bldhound.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I didn't know what to put for a subject, so I just tell you a problem
requirement they want for my ap. If the user hovers over a disabled control, they want a text bubble to explain why it's disabled. (This does not seem
unreasonable. There are tool tip bubbles coming up on the disabled toolbar
buttons on my email reader right now.)

Now the ToolTipProvider will not show a tip on a disabled control. Okay I
don't mind programming my own, but you don't get any events to react to
from a disabled control (do you? just one?) So how am I supposed to know
when to show this text? I'm trying to fake out being disabled by having a
usercontrol with a "fake disabled" property that will disable all the child controls, but the UserControl can still receive events. This is not great, though -- anyone know of any other way?

The problem with this UserControl fake is, well...
I don't want to respond to most events when it's disabled. I just want a
"mouse hover" or enter/leave or something.) For everything else, I have to
put "if (!fake_disabled)" around the whole thing. (This is a big deal
because pretty much all the controls we will use are of this nature, and
we're talking many many textboxes and checkboxes and buttons on many many
forms. That's thousands of events with this extra line of code we have to
type in every one.) Is there any possible way I could do something in the
UserControl to avoid dealing with all those events I don't want to respond
to when fake_disabled, and only allow the one I do want?

Thanks if you have any help at all...
-Rachel

Nov 16 '05 #2
Thanks!
Isn't it funny, all the time I struggled with how to do this, and just this
morning I was thinking the same thing... ToolTipProvider is attached to
container, not the control, and you could use something like a MouseMove on
the container. How obvious it seems now, but I never saw it until today.

Typically, these things will actually be on tab pages (not my idea), so I'm
thinking we'll really have to use TabControl mouse events (not sure -- I'm
still confused about where events start, when they bubble up and when they
don't...) maybe build a custom tool tip provider and attach it to a base
TabControl that we'll always use...

Well, I will read up on providers before I ask more questions :-)

-Rachel

"Lee Alexander" <lee@NoSpamPlease_Digita.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
When a control is disabled no mouse or keyboard input is passed to the
window. Instead if the window is a child then message is sent to the parent. So you can catch the fact that the mouse is over a disabled control in the
parent (Form) and handle tips manually knowing that.

Regards
Lee Alexander
.
"Rachel Suddeth" <ra****@bldhound.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I didn't know what to put for a subject, so I just tell you a problem
requirement they want for my ap. If the user hovers over a disabled

control,
they want a text bubble to explain why it's disabled. (This does not seem unreasonable. There are tool tip bubbles coming up on the disabled toolbar buttons on my email reader right now.)

. . .

Nov 16 '05 #3
Thanks!
Isn't it funny, all the time I struggled with how to do this, and just this
morning I was thinking the same thing... ToolTipProvider is attached to
container, not the control, and you could use something like a MouseMove on
the container. How obvious it seems now, but I never saw it until today.

Typically, these things will actually be on tab pages (not my idea), so I'm
thinking we'll really have to use TabControl mouse events (not sure -- I'm
still confused about where events start, when they bubble up and when they
don't...) maybe build a custom tool tip provider and attach it to a base
TabControl that we'll always use...

Well, I will read up on providers before I ask more questions :-)

-Rachel

"Lee Alexander" <lee@NoSpamPlease_Digita.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
When a control is disabled no mouse or keyboard input is passed to the
window. Instead if the window is a child then message is sent to the parent. So you can catch the fact that the mouse is over a disabled control in the
parent (Form) and handle tips manually knowing that.

Regards
Lee Alexander
.
"Rachel Suddeth" <ra****@bldhound.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I didn't know what to put for a subject, so I just tell you a problem
requirement they want for my ap. If the user hovers over a disabled

control,
they want a text bubble to explain why it's disabled. (This does not seem unreasonable. There are tool tip bubbles coming up on the disabled toolbar buttons on my email reader right now.)

. . .

Nov 16 '05 #4

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

Similar topics

2
1748
by: Skip Borland | last post by:
Has anyone tried to control the color changes that occur when a .net control (in this case specifically, a combo box) is disabled? We are trying to limit input, yet not have the control go gray on...
4
5653
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base...
4
3832
by: RSH | last post by:
This might be a dumb question but I have searched everywhere...I have a form which uses a custom background color. I have set the control's backgrounds to transparent, which works great. But when...
3
4351
by: Yoshitha | last post by:
Hi Is it possible to create my own tool box control (in c#.net) on which i can place the controls i've created or some other controls which already exisits? Can anyone tell me how to do this?...
4
8585
by: Bob | last post by:
Hi, Is it possible to change the forecolor of a disabled text control. I have a RichText Box that I don't want the user to edit but the Grey on Grey default is hard to read. Is there a way of...
0
973
by: Jason Huang | last post by:
Hi, How to set the color of a disabled control, such as a disabled ListView's color to white? Thanks for help. Jason
5
1257
Shashi Sadasivan
by: Shashi Sadasivan | last post by:
Hi, I have a 3rd party radio group control rg1, with a yes and a no field in it. Then there are 2 textbox controls after that. t1 and t2 now on the focus leave event of the rg1 i want to set t1 to...
3
1271
by: kea62227 | last post by:
I have a combobox. In the validating event of the combobox I check what value is chosen. If the value is "Skip" then I set the next control in the tabindex to enabled=false. But when I tab out of...
3
2607
by: SergioQ | last post by:
Perhaps I am reading it wrong, but I assumed that the line below would cause the value of 1 to be sent to the form. Instead it's sending a 0. <input type="checkbox" name="email_00_notify"...
0
7216
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
7303
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
7367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5613
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
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.