473,408 Members | 2,734 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,408 software developers and data experts.

WebControl.ToolTip -> window.status

Hello All,

For links in my page, I would like to change the window.status to show
something a little friendlier than
"javascript:WebForm_DoPostBackWithOptions(........ .....)".

I thought that using the ToolTip for the WebControl could be just the thing.
I have a function (see below signature) that recursively looks at the
controls on the page (and, if it HasControls, then at its child controls,
etc.), starting at "this". If the typeof() the control is one of a certain
set (such as ImageButton, LinkButton, etc.), it does something like:

webCtl.Attributes.Add("onmouseover", "window.status='" + webCtl.ToolTip +
"';");

That seems to work syntactically, except that I cannot figure out when to
call the function. The ToolTip property is always blank. Is this because I
am passing in Control and casting it to a WebControl when I find it's a
certain type? Or am I just not calling it at the correct time?

Thanks,
pagates

private void UpdateMyWindowStatus(Control ParentControl)
{
foreach (Control ctl in ParentControl.Controls)
{
if (ctl.HasControls())
UpdateMyWindowStatus(ctl);

Type CtlType = ctl.GetType();
if ((CtlType == typeof(LinkButton)) ||
(CtlType == typeof(ImageButton)) ||
(CtlType == typeof(LoginStatus)))
{
WebControl webCtl = (WebControl)ctl;
webCtl.Attributes.Add("onmouseover",
"window.status='" + webCtl.ToolTip + "'; return true;");
}
}
}

Sep 22 '06 #1
0 1260

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

Similar topics

1
by: Jim Mitchell | last post by:
I added a toolbar and then added two images that the user can not click on. I double click on the toolbar in design mode and it does not seem to create any kind of OnClick Event. Can someone...
0
by: Jim Mitchell | last post by:
I am using the following code to trap the onclick event for the Toolbar Webcontrol. The problem is that I have no way to tell which button on the toolbar was clicked. Any ideas? Thanks in...
0
by: Yves Royer | last post by:
Hi, I'm currently writing an application (in VS 2005 bčta 2) and made some own user controls. In each user control I added a ToolTip object so i can set some tooltips on checkboxes etc. What...
0
by: Yves Royer | last post by:
Hi, My first post didn't show up so here's a second try. I'm currently writing an application (in VS 2005 bčta 2) and made some own user controls. In each user control I added a ToolTip object...
1
by: Peter | last post by:
I have a dilemna. Currently I have created a custom calendar webcontrol that a user can select and will dump the date along with some specialized information set in the tooltip. It actually is...
6
by: ltt19 | last post by:
HI everyone, So, I have many buttons, and all of them must show a tooltip with the same string, except one word, that I must read this owrd from a variable. Although, the "ToolTip on x" property...
0
by: EricL | last post by:
Hello, I have written a Custom Control which inherits from ToolTip and it is an OwnerDraw tooltip. In the Popup event I calculate the size of the tooltip I need to display (rather large...
0
by: EricL | last post by:
Hello, I have written a Custom Control which inherits from ToolTip and it is an OwnerDraw tooltip. In the Popup event I calculate the size of the tooltip I need to display (rather large...
5
by: =?Utf-8?B?cGV0ZTE5Njk=?= | last post by:
I use Visual Studio 2005 and created a very simple Form with one button. I added a Tooltip for that button. It shows fine the first time I hover over that button. But if I let it disappear by the...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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,...

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.