Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   [C#] Problem mit MonthCalendar und BoldedDates (https://www.delphipraxis.net/101835-%5Bc-%5D-problem-mit-monthcalendar-und-boldeddates.html)

Dark Fish 18. Okt 2007 22:38


[C#] Problem mit MonthCalendar und BoldedDates
 
Hi Leute

Um in einem MonthCalendar Daten aus einem XML-Dokument fett darzustellen verwende ich folgenden Code:

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Xml;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            XmlDocument xmldoc = new XmlDocument();
            xmldoc.Load("C:/temp/termine.xml");
            XmlNode root = xmldoc.DocumentElement;
            XmlNode knoten = root.SelectSingleNode("/termine/termin");

            while (knoten != null)
            {
                DateTime datum = Convert.ToDateTime(knoten.Attributes["Datum"].Value);
                monthCalendar1.AddBoldedDate(datum);
                knoten = knoten.NextSibling;
            }
        }
    }
}
Dies soll beim Programmstart geschehen. Beim Debuggen wird es auch sofort durchlaufen, jedoch werden die fetten Daten erst angezeigt nachdem ich den Monat geändert habe. Danach läuft alles korrekt.

Was mache ich falsch?

Dark Fish 20. Okt 2007 14:00

Re: [C#] Problem mit MonthCalendar und BoldedDates
 
hat sich erledigt...

Sergej 20. Okt 2007 14:41

Re: [C#] Problem mit MonthCalendar und BoldedDates
 
Wäre nett wenn du deine Lösung trotzdem hier posten würdest ;-)


Alle Zeitangaben in WEZ +1. Es ist jetzt 12:31 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz