How to create a hint?

M

Marek

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?
 
M

Marek

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

Shiva

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);
}
*/
}

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

Guest

Hey Shiva

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

Thanks
vinay
 
G

Guest

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top