Solved

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

Posted on 2008-10-22
2
418 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
2 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 500 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

830 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