The style such as fontSize property of ToolTips routines has effect on only the text that is outside any table directive tags(table,tr,td). Once you choose to display text within table, you should do more to be able to control the font size, color and so on.
How to
To set the ToolTips font style of text in table, please follow the steps below:
- Defined a css class and place this code piece between <head>..</head> tags of the page:
[Inside the .aspx file]
......
<HEAD>
......
<style>
.ToolTipStyle { FONT-WEIGHT: bold; FONT-SIZE: 20px; COLOR: red }
</style>
</HEAD>
......
2.Apply this css class to the table in your tooltips:
[In the .cs file]
......
Page page = this.Page ;
string toolTips = "<table class=\"ToolTipStyle\"><tr><td>Hello, This is My ToolTips!!</td></tr></table>";
WebControl webControl = TextBox1;
XLib.ToolTip(ref page,ref webControl,toolTips,Color.Yellow, Color.Red, 12);
......
Sample Effect
Used to create a more flexible tool-tip.
8/17/2005 12:18:31 AM - -202.96.130.108
Used to create a more flexible tool-tip.
8/17/2005 12:18:31 AM - -202.96.130.108