From 1e58b08fa61b16d1065e9131519e73fbde42d7f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Mon, 24 Dec 2012 13:39:15 +0000 Subject: [PATCH] [GB.FORM] * NEW: Take the DateChooser[].Font property into account. git-svn-id: svn://localhost/gambas/trunk@5469 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.form/.component | 1 - comp/src/gb.form/.project | 4 ++-- comp/src/gb.form/.src/Date/FCalendar.class | 4 +++- comp/src/gb.form/.src/Test/Form2.class | 7 +++++++ comp/src/gb.form/.src/Test/Form2.form | 3 +++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/comp/src/gb.form/.component b/comp/src/gb.form/.component index da62187db..5fb4d373b 100644 --- a/comp/src/gb.form/.component +++ b/comp/src/gb.form/.component @@ -3,4 +3,3 @@ Key=gb.form Version=3.3.90 Authors=Benoît Minisini Needs=Form - diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index e995cf680..abca81489 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -1,7 +1,7 @@ # Gambas Project File 3.0 # Compiled with Gambas 3.3.90 Title=More controls for graphical components -Startup=FLCDLabel +Startup=Form2 Version=3.3.90 VersionFile=1 Component=gb.image @@ -9,7 +9,7 @@ Component=gb.gui Component=gb.form Component=gb.settings Authors="Benoît Minisini" -Environment="GB_GUI=gb.qt4\nGB_STOCK=debug\nLANG=C\nLC_ALL=C" +Environment="GB_GUI=gb.qt4\nGB_STOCK=debug" TabSize=2 Translate=1 Language=en diff --git a/comp/src/gb.form/.src/Date/FCalendar.class b/comp/src/gb.form/.src/Date/FCalendar.class index 62e7c55d8..7f905f0d5 100644 --- a/comp/src/gb.form/.src/Date/FCalendar.class +++ b/comp/src/gb.form/.src/Date/FCalendar.class @@ -52,7 +52,7 @@ Public Sub _new() dwgTime.W = Desktop.Scale * 16 - FillMonth(False ) + FillMonth(False) $dDate = Now SetDate() @@ -216,6 +216,8 @@ Public Sub dwgMonth_Draw() If iForeground = Color.Default Then iForeground = dwgMonth.Foreground iBackground = hDate.Background If iBackground = Color.Default Then iBackground = dwgMonth.Background + + Draw.Font = hDate.Font If CInt(dDate) = CInt($dDate) Then Draw.FillColor = If(dwgMonth.HasFocus, Color.SelectedBackground, Color.LightForeground) diff --git a/comp/src/gb.form/.src/Test/Form2.class b/comp/src/gb.form/.src/Test/Form2.class index 65d5ec333..95661df0e 100644 --- a/comp/src/gb.form/.src/Test/Form2.class +++ b/comp/src/gb.form/.src/Test/Form2.class @@ -73,4 +73,11 @@ Public Sub Button1_Click() +End + +Public Sub DateChooser1_Data({Date} As Date) + + If WeekDay({Date}) = gb.Sunday Then DateChooser1.Data.Foreground = Color.Red + If Day({Date}) = 24 Then DateChooser1.Data.Font = Font["serif"] + End diff --git a/comp/src/gb.form/.src/Test/Form2.form b/comp/src/gb.form/.src/Test/Form2.form index a56d57a6f..084f57183 100644 --- a/comp/src/gb.form/.src/Test/Form2.form +++ b/comp/src/gb.form/.src/Test/Form2.form @@ -77,4 +77,7 @@ MoveScaled(61,14,24,4) Mode = DateChooser.DateTime } + { DateChooser1 DateChooser + MoveScaled(6,38,48,32) + } }