How to create a hint?

Discussion in 'ASP .Net' started by Marek, Dec 27, 2004.

  1. Marek

    Marek Guest

    I'm trying to create a web page.
    I will have one column with records (table filled from dataset).
    If mouse will be on one from this records, i want to show a hint what is it
    (like in Windows - cursor on shortcut and i have a path to application).
    How can i do this?
    Marek, Dec 27, 2004
    #1
    1. Advertising

  2. Marek

    Shiva Guest

    Hi,

    This has one implementation:
    http://dotnetjunkies.com/WebLog/clarkescott/archive/2004/10/12/28366.aspx

    "Marek" <> wrote in message
    news:#xOtT$#...
    I'm trying to create a web page.
    I will have one column with records (table filled from dataset).
    If mouse will be on one from this records, i want to show a hint what is it
    (like in Windows - cursor on shortcut and i have a path to application).
    How can i do this?
    Shiva, Dec 27, 2004
    #2
    1. Advertising

  3. Marek

    Marek Guest

    Thanks!
    It will help me i think.
    Maybe is there any posibility to do this from clear framework?


    U¿ytkownik "Shiva" <> napisa³ w wiadomo¶ci
    news:uzldFQ$...
    > Hi,
    >
    > This has one implementation:
    > http://dotnetjunkies.com/WebLog/clarkescott/archive/2004/10/12/28366.aspx
    >
    > "Marek" <> wrote in message
    > news:#xOtT$#...
    > I'm trying to create a web page.
    > I will have one column with records (table filled from dataset).
    > If mouse will be on one from this records, i want to show a hint what is
    > it
    > (like in Windows - cursor on shortcut and i have a path to application).
    > How can i do this?
    >
    >
    >
    Marek, Dec 27, 2004
    #3
  4. Marek

    Shiva Guest

    Alternative is to use the TITLE attribute of the cells or the row. For
    DataGrid, as an example, use the ItemDataBound event as in:

    void Grid_ItemDataBound(Object sender, DataGridItemEventArgs e)
    {
    // Tooltip at the row level: all cells will have same tooltip
    e.Item.Attributes.Add ("Title", "Row#:" + e.Item.ItemIndex.ToString());

    // Per-cell tool tip
    /*
    foreach (TableCell tc in e.Item.Cells)
    {
    tc.Attributes.Add ("Title", "Cell ID : " + tc.ClientID);
    }
    */
    }

    "Marek" <> wrote in message
    news:O7U#...
    Thanks!
    It will help me i think.
    Maybe is there any posibility to do this from clear framework?


    U¿ytkownik "Shiva" <> napisa³ w wiadomo¶ci
    news:uzldFQ$...
    > Hi,
    >
    > This has one implementation:
    > http://dotnetjunkies.com/WebLog/clarkescott/archive/2004/10/12/28366.aspx
    >
    > "Marek" <> wrote in message
    > news:#xOtT$#...
    > I'm trying to create a web page.
    > I will have one column with records (table filled from dataset).
    > If mouse will be on one from this records, i want to show a hint what is
    > it
    > (like in Windows - cursor on shortcut and i have a path to application).
    > How can i do this?
    >
    >
    >
    Shiva, Dec 27, 2004
    #4
  5. Hey Shiva

    Do you know how to create the same for Dropdown Items (individual list
    items) ??

    Thanks
    vinay

    "Shiva" wrote:

    > Alternative is to use the TITLE attribute of the cells or the row. For
    > DataGrid, as an example, use the ItemDataBound event as in:
    >
    > void Grid_ItemDataBound(Object sender, DataGridItemEventArgs e)
    > {
    > // Tooltip at the row level: all cells will have same tooltip
    > e.Item.Attributes.Add ("Title", "Row#:" + e.Item.ItemIndex.ToString());
    >
    > // Per-cell tool tip
    > /*
    > foreach (TableCell tc in e.Item.Cells)
    > {
    > tc.Attributes.Add ("Title", "Cell ID : " + tc.ClientID);
    > }
    > */
    > }
    >
    > "Marek" <> wrote in message
    > news:O7U#...
    > Thanks!
    > It will help me i think.
    > Maybe is there any posibility to do this from clear framework?
    >
    >
    > U¿ytkownik "Shiva" <> napisa³ w wiadomo¶ci
    > news:uzldFQ$...
    > > Hi,
    > >
    > > This has one implementation:
    > > http://dotnetjunkies.com/WebLog/clarkescott/archive/2004/10/12/28366.aspx
    > >
    > > "Marek" <> wrote in message
    > > news:#xOtT$#...
    > > I'm trying to create a web page.
    > > I will have one column with records (table filled from dataset).
    > > If mouse will be on one from this records, i want to show a hint what is
    > > it
    > > (like in Windows - cursor on shortcut and i have a path to application).
    > > How can i do this?
    > >
    > >
    > >

    >
    >
    >
    >
    =?Utf-8?B?dmluYXk=?=, Dec 27, 2004
    #5
  6. This may be overkill but I often use popups for this. I like the control I
    have over the content and the ability to include graphics.

    <HEAD ....

    <script language="JavaScript">
    <!--
    var oPopup = window.createPopup();


    var TipsDisabled=0;

    function richToolTip(fld,wideness, leftoffset) {
    var lefter = 0;
    TipsDisabled = top.Get_TipStatus();
    if (TipsDisabled==0) {
    if (leftoffset==-1) { lefter = window.event.screenX - (wideness *
    1.4); }
    else if (leftoffset == 2) { lefter = window.event.screenX - 140; }
    else {lefter = window.event.screenX - wideness; }
    var topper = window.event.screenY -140;
    oPopup.document.body.innerHTML = fld.innerHTML;
    var popupBody = oPopup.document.body;
    oPopup.show(0, 0, wideness, 0);
    var tallness = popupBody.scrollHeight;
    oPopup.hide();
    oPopup.show(lefter, topper, wideness, tallness, window.document.body); }
    }



    function ContextHelp(iContext) {
    var sType = document.frmMain.hdnSchType.value;
    var bResult = 0;

    bResult = top.GlobalContextHelp(iContext, sType);
    }

    //-->
    </script>

    </HEAD>

    <BODY .....>

    <!-- START POP-UP //-->
    <SPAN id="tip_Criteria"
    style="FONT-WEIGHT: bold; FLOAT: left; WIDTH: 24px; CURSOR: help;
    COLOR: green; DIRECTION: ltr; POSITION: static; HEIGHT: 19px;
    TEXT-ALIGN: left"
    onmouseover="richToolTip(oToolTip_Criteria,170,-1);"
    onclick="ContextHelp(2);"
    onmouseout="oPopup.hide()">
    <IMG height="15" alt="" src="./images/qmrk_blue.gif" width="15">
    </SPAN>
    <!-- THIS CODE CONTROLS THE BOX AND WHAT IS IN IT -->
    <DIV id="oToolTip_Criteria" style="DISPLAY: none">
    <DIV style="BORDER-RIGHT: #0099ff 3px inset; PADDING-RIGHT: 5px; BORDER-TOP:
    aqua 3px outset; PADDING-LEFT: 5px; Z-INDEX: 102; FILTER:
    progid:DXImageTransform.Microsoft.Gradient(GradientType=0,
    StartColorStr=aqua, EndColorStr=#FFFFFF); LEFT: 0px; PADDING-BOTTOM: 5px;
    FONT: 9pt arial; BORDER-LEFT: aqua 3px outset; WIDTH: 100%; PADDING-TOP: 5px;
    BORDER-BOTTOM: #0099ff 3px inset; POSITION: absolute; TOP: 0px; HEIGHT: 100%">
    <B>Search Criteria</B>
    <HR style="BORDER-RIGHT: 1px outset; BORDER-TOP: 1px outset; BORDER-LEFT: 1px
    outset; BORDER-BOTTOM: 1px outset" color="#66ccff" SIZE="3">
    - Click <I>Database Search Criteria</I> to access/setup database search
    criteria.<BR>
    <BR><FONT color="#000080">
    - Click <I>Document Search Criteria</I> to access/setup document search
    criteria.</FONT><BR>
    <BR>
    <IMG src="./images/leftred.gif"> The red arrow indicates currently active
    search type and criteria.<BR>
    <BR>
    <FONT face="Arial" color="#000080">
    <B><I>Click for more information.</I></B></FONT>
    </DIV>
    </DIV>
    <!-- END POP-UP -->


    </BODY>





    "Marek" wrote:

    > I'm trying to create a web page.
    > I will have one column with records (table filled from dataset).
    > If mouse will be on one from this records, i want to show a hint what is it
    > (like in Windows - cursor on shortcut and i have a path to application).
    > How can i do this?
    >
    >
    >
    =?Utf-8?B?a2VybWl0?=, Dec 27, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Pope
    Replies:
    5
    Views:
    463
    Silvio Bierman
    Feb 22, 2004
  2. ShadowMan

    [Eclipse] Another hint..required

    ShadowMan, Jun 9, 2004, in forum: Java
    Replies:
    5
    Views:
    413
    Bryce
    Jun 11, 2004
  3. news.skynet.be
    Replies:
    0
    Views:
    574
    news.skynet.be
    Mar 25, 2005
  4. Meikel
    Replies:
    0
    Views:
    485
    Meikel
    Jan 17, 2005
  5. dover
    Replies:
    2
    Views:
    1,828
    Dave Townsend
    Jul 23, 2004
Loading...

Share This Page