CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    170

    [RESOLVED] Change Calendar control attributes

    I'm trying to change the attributes from a calendar control in framework 1.1. But whatever I do nothing changes what am I doing wrong? I also want to remove the underlining of the dates?

    Code:
    this.calendar = new Calendar();
    this.calendar.BackColor = Color.Pink;
    this.calendar.SelectedDate = DateTime.Now;
    this.calendar.ShowDayHeader = true;
    //TodayDayStyle.BackColor = Color.Chocolate;
    Last edited by Visslan; April 25th, 2007 at 03:19 AM.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto
    Posts
    805

    Re: Change Calendar control attributes

    your constructing a new calendar and adjusting its properites.

    you should place the calendar on your aspx page and just reference it by its id name

    like

    this.myCalendarName.BackColor = Color.Pink

    your line
    Code:
    this.calendar = new Calendar();
    is creating a new calendar object that your editing, and im guessing that its not on the page. i think you can just drop that line and you should get it working

    hth,
    mcm
    rate my posts!
    mcm

  3. #3
    Join Date
    May 2006
    Posts
    170

    Smile Re: Change Calendar control attributes

    Thanks

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto
    Posts
    805

    Re: Change Calendar control attributes

    if it helped please rate the post.

    thanks,
    mcm
    rate my posts!
    mcm

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured