作成日: 2018/04/12 最終更新日: 2018/04/12
文書種別
使用方法
詳細
C1Calendarの月ヘッダと日ヘッダのフォントは、以下のようにして設定可能です。
■設計時■
C1Calendarのスマートデザイナの「外観オプションの設定」をクリック
>「表示スタイル」ダイアログ > 左ペインの「共通」ツリーを展開
>「月のヘッダ」、「日のヘッダ」を選択
> フォントを指定
■実行時■
コードで月ヘッダと日ヘッダのフォントを変更するには、C1Calendar1に設定しているテーマの"Header"および"DayHeader"l項目のFontを指定したのち、C1CalendarのThemeプロパティに割り当てます。
◎サンプルコード(VB)
◎サンプルコード(C#)
月ヘッダや日ヘッダ以外にも、以下の項目名を使用して、実行時にC1Calendarの各項のフォントを設定することができます。
※カッコ内が、コードで指定する際の項目名になります。
◇テーマの各項目
------------------------------------------
共通(Common)
- ナビゲーションボタン(Button)
- 月のヘッダ(Header)
- 日のヘッダ(DayHeader)
- 日
- 平日(Day)
- 週末(DayWeekend)
- 今日(DayToday)
- 選択された日(DaySelected)
- 太字表示の日(DayBold)
- 選択中の太字の日(DaySelectedBold)
- 今月に該当しない日(DayTrail)
------------------------------------------
■設計時■
C1Calendarのスマートデザイナの「外観オプションの設定」をクリック
>「表示スタイル」ダイアログ > 左ペインの「共通」ツリーを展開
>「月のヘッダ」、「日のヘッダ」を選択
> フォントを指定
■実行時■
コードで月ヘッダと日ヘッダのフォントを変更するには、C1Calendar1に設定しているテーマの"Header"および"DayHeader"l項目のFontを指定したのち、C1CalendarのThemeプロパティに割り当てます。
◎サンプルコード(VB)
Imports C1.Framework
Imports C1.Win.C1Schedule
Dim theme As Theme = UI.CalendarTheme.Office2007Blue
theme.Item("Header").Font = New Font("メイリオ", 16, FontStyle.Bold)
theme.Item("DayHeader").Font = New Font("MS Gothic", 12, FontStyle.Italic)
C1Calendar1.Theme = theme
Imports C1.Win.C1Schedule
Dim theme As Theme = UI.CalendarTheme.Office2007Blue
theme.Item("Header").Font = New Font("メイリオ", 16, FontStyle.Bold)
theme.Item("DayHeader").Font = New Font("MS Gothic", 12, FontStyle.Italic)
C1Calendar1.Theme = theme
◎サンプルコード(C#)
using C1.Framework;
using C1.Win.C1Schedule;
Theme theme = C1.Win.C1Schedule.UI.CalendarTheme.Office2007Blue;
theme["Header"].Font = new Font("メイリオ", 16, FontStyle.Bold);
theme["DayHeader"].Font = new Font("MS Gothic", 12, FontStyle.Italic);
c1Calendar1.Theme = (C1.Win.C1Schedule.UI.CalendarTheme)theme;
using C1.Win.C1Schedule;
Theme theme = C1.Win.C1Schedule.UI.CalendarTheme.Office2007Blue;
theme["Header"].Font = new Font("メイリオ", 16, FontStyle.Bold);
theme["DayHeader"].Font = new Font("MS Gothic", 12, FontStyle.Italic);
c1Calendar1.Theme = (C1.Win.C1Schedule.UI.CalendarTheme)theme;
月ヘッダや日ヘッダ以外にも、以下の項目名を使用して、実行時にC1Calendarの各項のフォントを設定することができます。
※カッコ内が、コードで指定する際の項目名になります。
◇テーマの各項目
------------------------------------------
共通(Common)
- ナビゲーションボタン(Button)
- 月のヘッダ(Header)
- 日のヘッダ(DayHeader)
- 日
- 平日(Day)
- 週末(DayWeekend)
- 今日(DayToday)
- 選択された日(DaySelected)
- 太字表示の日(DayBold)
- 選択中の太字の日(DaySelectedBold)
- 今月に該当しない日(DayTrail)
------------------------------------------
旧文書番号
82617