Home arrow JavaScript arrow How to Use the Dojo Tooltip Widget
JAVASCRIPT

How to Use the Dojo Tooltip Widget


Windows uses tooltips; they're also commonly found on web pages. This article shows you how to use dojo to render tooltips with some very useful and unusual effects.

Author Info:
By: Jayaram Krishnaswamy
Rating: 3 stars3 stars3 stars3 stars3 stars / 16
January 23, 2007
TABLE OF CONTENTS:
  1. · How to Use the Dojo Tooltip Widget
  2. · Tooltip in HTML
  3. · Creating a tooltip for objects
  4. · Getting some color into the tooltip
  5. · How about an image in the tooltip?
  6. · The default style of dojoType tooltip
  7. · Creating a tooltip dynamically

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
How to Use the Dojo Tooltip Widget
(Page 1 of 7 )

Introduction

Tooltips are window control objects used to add extra information in the form of descriptive text displayed in a pop-up window. Just hovering over the element pops up this extra information (see the next picture). Tooltips are extensively used in both Windows forms and web pages. Microsoft controls, from early on, used the tooltip property that would bring up a little beige window with some text.

Tooltip text is also displayed on web pages. The DOJO Foundation's tooltip rendering is awesome. The tooltips rendered by HTML pale in comparison. This article, like the previous one, is really basic and is written to give a flavor of what this widget does and how it is done. The readers should visit the Dojo Foundation web site to learn more about the exciting possibilities.

Microsoft tooltip control

The Microsoft variety of tooltip can be seen in all of its products, from the Start button of Windows to the tooltips that pop up over most of its controls. Here is a basic one from Windows XP.

In Visual Basic you would set the tooltip property if you need to use the tooltip to provide some additional information. In the .NET 3.0 environment the tooltip can escape the drab "text only" rendering and use the ContentProperty, as in the following XAML code for the tooltip property of a textbox. But XAML has yet to find widespread use. The tooltip in this case will be mainly described by the non-inheritable ToolTip and ToolTipService classes. The next snippet is taken from Microsoft documentation.

<TextBox HorizontalAlignment="Left">ToolTip with non-text content
<TextBox.ToolTip>
<ToolTip>
<DockPanel Width="50" Height="70">
<Image Source="data\flower.jpg"/>
<TextBlock>Useful information goes here.</TextBlock>
</DockPanel>
</ToolTip>
</TextBox.ToolTip>
</TextBox>


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks
- Dynamic jQuery Styling

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 9 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials