![]() |
[C#] Problem mit MonthCalendar und BoldedDates
Hi Leute
Um in einem MonthCalendar Daten aus einem XML-Dokument fett darzustellen verwende ich folgenden Code:
Code:
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.
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; } } } } Was mache ich falsch? |
Re: [C#] Problem mit MonthCalendar und BoldedDates
hat sich erledigt...
|
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 05:20 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz