Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Changing the color of cell on mouse over event in calendar control (http://www.velocityreviews.com/forums/t779694-changing-the-color-of-cell-on-mouse-over-event-in-calendar-control.html)

Garg 03-16-2007 06:32 AM

Changing the color of cell on mouse over event in calendar control
 
Hi,

I want to make the color of a cell change in my calendar control,
whenever mouse is brought over that particular cell. How can I achieve
this functionality??

Thanks,
Shivani


marss 03-19-2007 07:40 AM

Re: Changing the color of cell on mouse over event in calendar control
 

Garg wrote:
> Hi,
>
> I want to make the color of a cell change in my calendar control,
> whenever mouse is brought over that particular cell. How can I achieve
> this functionality??
>
> Thanks,
> Shivani


Here the example:
cell.Attributes["onmouseover"] =
"this.style.backgroundColor='#ff0000';";
cell.Attributes["onmouseout"] =
"this.style.backgroundColor='#0000ff';";

Or if existing background color of the cell is set by the style sheet
or it is inherited from parent element:
cell.Attributes["onmouseover"] =
"this.oldBGColor=this.style.backgroundColor;this.s tyle.backgroundColor='#ff0000';";
cell.Attributes["onmouseout"] =
"this.style.backgroundColor=this.oldBGColor;";



All times are GMT. The time now is 02:27 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.