?
Solved

Styling Calendar object in c#.net-increasing calendar size in px

Posted on 2008-10-22
2
Medium Priority
?
422 Views
Last Modified: 2012-05-05
Hi,

I'm trying to display a calendar using c# asp.net. I have a basic calendar but its too small and i cant figure out what properties i need to  use to change the size of the calendar, so that the calendar takes up 375 pixels by 250 px and also make each square that each date sits in larger to fill the larger calendar grid?

thanks Charlie
<asp:Calendar id="Calendar1"
     OnSelectionChanged="Date_Selected"
     SelectionMode="DayWeekMonth"
     Font-Name="Verdana" 
     Font-Size="12px"
     NextPrevFormat="ShortMonth"
     SelectWeekText="week"
     SelectMonthText="month"
     runat="server">
 
   <TodayDayStyle Font-Bold="True"/>
   <DayHeaderStyle Font-Bold="True"/>
   <OtherMonthDayStyle ForeColor="gray"/>
   <TitleStyle BackColor="#3366ff"
               ForeColor="white"
               Font-Bold="True"/>
 
   <SelectedDayStyle BackColor="#ffcc66"
                     Font-Bold="True"/>
   <NextPrevStyle ForeColor="white"
                  Font-Size="10px"/>
   <SelectorStyle BackColor="#99ccff" 
                  ForeColor="navy"
                  Font-Size="9px"/>
</asp:Calendar>

Open in new window

calendar.jpg
0
Comment
Question by:CharlieDev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 2000 total points
ID: 22778637
add Width="375px" Height="250px" to the <asp:Calendar tag

try playing with Font-Size attribute
i tried using Font-Size="Larger" and Font-Size="X-Large" and they were filling the calendar quite well
0
 

Author Comment

by:CharlieDev
ID: 22780940
Thanks, I'm not at  my work pc at the moment but i'm sure that will do the job. I guess I should of just tried adding the size to the table as it was kind of obvious. Easy to say when you have the answer in front of you though, so thanks for the help.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question