JavaScript
  Home arrow JavaScript arrow How to Use the Dojo Tooltip Widget
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

How to Use the Dojo Tooltip Widget
By: Jayaram Krishnaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 12
    2007-01-23

    Table of Contents:
  • How to Use the Dojo Tooltip Widget
  • Tooltip in HTML
  • Creating a tooltip for objects
  • Getting some color into the tooltip
  • How about an image in the tooltip?
  • The default style of dojoType tooltip
  • Creating a tooltip dynamically

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    How to Use the Dojo Tooltip Widget


    (Page 1 of 7 )

    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.

    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>
    

    More JavaScript Articles
    More By Jayaram Krishnaswamy


       · That is correct. No more drab looking tooltip. You can put anything you want,...
       · Thanx for writing this, I really needed an explanation of how to use it. But...
     

    JAVASCRIPT ARTICLES

    - Using Click Interceptions with a Database-Dr...
    - Using JavaScript Click Interceptions in an I...
    - Using Click Interceptions with JavaScript
    - QuickSort in Action
    - Quicksort
    - Using Mod_Security to Protect Your Server
    - Detecting and Countering Server Intrusions
    - Securing Your Web Server
    - Building a Secure Web Server
    - Protecting the Server
    - Book Review: Learning the Yahoo! User Interf...
    - Dynamically Generate a Selection List in a R...
    - Intergrate DWR into Your Java Web Application
    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT