Nen Abend Leute,
Ich würde gerne bestimmte Tage im Kalender(GUICtrlCreateMonthCal) wenns geht irgendwie hervorheben
nur hab ich in der Hilfe nix gefunden.
gehts sowas mit AutoIt überhaupt???
Mfg Keyle
Nen Abend Leute,
Ich würde gerne bestimmte Tage im Kalender(GUICtrlCreateMonthCal) wenns geht irgendwie hervorheben
nur hab ich in der Hilfe nix gefunden.
gehts sowas mit AutoIt überhaupt???
Mfg Keyle
denke schon aber net so leicht ich denke ab besten du machst dir selber nen kalender
*push* Würde mich auch interessieren, ob das geht. Oder macht der Kalender das automatisch mit einer kleinen Umrandung oder so etwas?
GUICtrlCreateMonthCal kann das nicht! Dazu musst Du schon eine eigene GUI erstellen.
Oder es hat jemand Langeweile und möchte gerne eine UDF dafür erstellen.
Man könnte experimentieren, ob sich der Bereich (Rectangle) eines Datums selektieren und dann OWNERDRAW darauf anwenden läßt. Wer will kann loslegen.
Hmm... riecht nach viel Arbeit...
Mal sehen, vielleicht setz ich mal ran^^
Edit: Soo, hab schonmal einen Kalender erstellt. Nur das mit dem hervorheben musst du noch machen(Also die Labelbackgroundcolor ändern)
$Form1_1 = GUICreate("Form1", 751, 501, 293, 269)$1 = GUICtrlCreateLabel(" 1", 456, 16, 17, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$2 = GUICtrlCreateLabel("2", 488, 16, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$3 = GUICtrlCreateLabel("3", 520, 16, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$4 = GUICtrlCreateLabel("4", 552, 16, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$5 = GUICtrlCreateLabel("5", 584, 16, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$6 = GUICtrlCreateLabel("6", 616, 16, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$7 = GUICtrlCreateLabel("7", 648, 16, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$8 = GUICtrlCreateLabel("8", 456, 48, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$9 = GUICtrlCreateLabel("9", 488, 48, 13, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$10 = GUICtrlCreateLabel("10", 512, 48, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$11 = GUICtrlCreateLabel("11", 544, 48, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$12 = GUICtrlCreateLabel("12", 576, 48, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$13 = GUICtrlCreateLabel("13", 608, 48, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$14 = GUICtrlCreateLabel("14", 640, 48, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$15 = GUICtrlCreateLabel("15", 448, 80, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$16 = GUICtrlCreateLabel("16", 480, 80, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$17 = GUICtrlCreateLabel("17", 512, 80, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$18 = GUICtrlCreateLabel("18", 544, 80, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$19 = GUICtrlCreateLabel("19", 576, 80, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$20 = GUICtrlCreateLabel("20", 608, 80, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$21 = GUICtrlCreateLabel("21", 640, 80, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$22 = GUICtrlCreateLabel("22", 448, 112, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$23 = GUICtrlCreateLabel("23", 480, 112, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$24 = GUICtrlCreateLabel("24", 512, 112, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$25 = GUICtrlCreateLabel("25", 544, 112, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$26 = GUICtrlCreateLabel("26", 576, 112, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$27 = GUICtrlCreateLabel("27", 608, 112, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$28 = GUICtrlCreateLabel("28", 640, 112, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$nextmon = GUICtrlCreateButton(">", 672, 16, 33, 25, 0)
$prevmon = GUICtrlCreateButton("<", 408, 16, 33, 25, 0)
$29 = GUICtrlCreateLabel("29", 448, 144, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$30 = GUICtrlCreateLabel("30", 480, 144, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$31 = GUICtrlCreateLabel("31", 512, 144, 22, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUISetState(@SW_SHOW)
$mon = @MON
$Monat = 0
$Jahr = @YEAR
call("Monat")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $nextmon
$mon = $mon+1
If $mon >12 Then
$mon = 1
$Jahr = $Jahr+1
EndIf
Call("Monat")
Case $prevmon
$mon = $mon-1
If $mon <1 Then
$mon = 12
$Jahr = $Jahr-1
EndIf
Call("Monat")
Case $Punkte
EndSwitch
WEnd
Func Monat()
If $mon = 1 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("Januar", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($30, $GUI_show)
GUICtrlSetState($29, $GUI_show)
EndIf
If $mon = 2 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("Februar", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
$schaltjahr = $Jahr / 4
If $schaltjahr-Round($schaltjahr,0) = 0 Then
GUICtrlSetState($31, $GUI_Hide)
GUICtrlSetState($30, $GUI_Hide)
Else
GUICtrlSetState($31, $GUI_Hide)
GUICtrlSetState($30, $GUI_Hide)
GUICtrlSetState($29, $GUI_Hide)
EndIf
EndIf
If $mon = 3 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("März", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_show)
GUICtrlSetState($30, $GUI_show)
GUICtrlSetState($29, $GUI_show)
EndIf
If $mon = 4 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("April", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_Hide)
EndIf
If $mon = 5 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("Mai", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_show)
GUICtrlSetState($30, $GUI_show)
GUICtrlSetState($29, $GUI_show)
EndIf
If $mon = 6 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("Juni", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_Hide)
EndIf
If $mon = 7 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("Juli", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_show)
GUICtrlSetState($30, $GUI_show)
GUICtrlSetState($29, $GUI_show)
EndIf
If $mon = 8 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("August", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($30, $GUI_show)
GUICtrlSetState($29, $GUI_show)
EndIf
If $mon = 9 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("September", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_Hide)
EndIf
If $mon = 10 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("Oktober", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_show)
GUICtrlSetState($30, $GUI_show)
GUICtrlSetState($29, $GUI_show)
EndIf
If $mon = 11 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("November", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_Hide)
EndIf
If $mon = 12 Then
GUICtrlSetState($Monat, $GUI_Hide)
$Monat = GUICtrlCreateLabel("Dezember", 255, 50)
GUIctrlSetState($Monat, $GUI_show)
GUICtrlSetState($31, $GUI_show)
GUICtrlSetState($30, $GUI_show)
GUICtrlSetState($29, $GUI_show)
EndIf
EndFunc
Von der Größe nicht stören lassen, brauche selbst einen Kalender^^
LOL - wußte gar nicht, dass es dafür schon eine UDF gibt.
Zumindest kannst du damit einen Tag (Heute) markieren.
Edit: Mehrere Tage markierst du (fett) mit _GUICtrlMonthCal_SetDayState($hWnd, $aMasks).
In der Hilfe findest du ein Bsp. dazu.
Edit: Um das Erstellen der Maske zu vereinfachen: Maske zum Markieren in Monatskalender erstellen
[autoit]#Include <GuiMonthCal.au3>
$gui = GUICreate('')
$cal = GUICtrlCreateMonthCal('MyCal', 10, 10)
$hWnd = GUICtrlGetHandle($cal)
GUISetState()
Sleep(1000)
_GUICtrlMonthCal_SetToday($hWnd, 2009, 12, 24)
Do
Until GUIGetMsg() = -3