Calendar
TsgcHTMLComponent_Calendar — Delphi, C++ Builder 및 .NET에서 색상이 지정된 이벤트 점, 오늘 강조 표시 및 이전/다음 내비게이션을 갖춘 월별 그리드 캘린더를 렌더링합니다.
TsgcHTMLComponent_Calendar — Delphi, C++ Builder 및 .NET에서 색상이 지정된 이벤트 점, 오늘 강조 표시 및 이전/다음 내비게이션을 갖춘 월별 그리드 캘린더를 렌더링합니다.
Year와 Month를 설정하고, 특정 날짜에 이벤트를 추가한 다음(또는 데이터셋을 바인딩한 다음), HTML 속성을 읽습니다.
TsgcHTMLComponent_Calendar
월별 그리드 <table>이 있는 Bootstrap 5 카드
Delphi, C++ Builder, .NET
Year와 Month를 설정하고, Day, Title 및 Color가 있는 Events.Add 항목 몇 개를 추가한 다음, HTML을 읽습니다.
uses
sgcHTML_Component_Calendar;
var
oCal: TsgcHTMLComponent_Calendar;
oEvt: TsgcHTMLCalendarEvent;
begin
oCal := TsgcHTMLComponent_Calendar.Create(nil);
try
oCal.Year := 2026;
oCal.Month := 6;
oCal.HighlightToday := True;
oCal.ShowNavigation := True;
oEvt := oCal.Events.Add;
oEvt.Day := 12;
oEvt.Title := 'Release';
oEvt.Color := '#7C3AED';
WebModule.Response := oCal.HTML; // card + month-grid table
finally
oCal.Free;
end;
end;
// Or bind it straight to a dataset:
oCal.LoadFromDataSet(qryEvents, 'EventDate', 'Subject');
// includes: sgcHTML_Component_Calendar.hpp
TsgcHTMLComponent_Calendar *oCal = new TsgcHTMLComponent_Calendar(NULL);
try
{
oCal->Year = 2026;
oCal->Month = 6;
oCal->HighlightToday = true;
oCal->ShowNavigation = true;
TsgcHTMLCalendarEvent *oEvt = oCal->Events->Add();
oEvt->Day = 12;
oEvt->Title = "Release";
oEvt->Color = "#7C3AED";
String html = oCal->HTML; // card + month-grid table
}
__finally
{
delete oCal;
}
using esegece.sgcWebSockets;
var cal = new TsgcHTMLComponent_Calendar();
cal.Year = 2026;
cal.Month = 6;
cal.HighlightToday = true;
cal.ShowNavigation = true;
var evt = cal.Events.Add();
evt.Day = 12;
evt.Title = "Release";
evt.Color = "#7C3AED";
string html = cal.HTML; // card + month-grid table
가장 자주 사용하게 되는 멤버.
Year와 Month는 그리드를 선택합니다. 기본값은 현재 월이며, GetMonthName이 제목을 구동합니다.
Events는 Day, Title, 16진수 Color 및 열거형 ColorStyle이 있는 항목을 담습니다. 각 이벤트는 해당 날짜 아래에 색상 점으로 렌더링됩니다.
LoadFromDataSet(aDataSet, aDateField, aTitleField)은 현재 월과 연도 내에 속하는 각 행에 대해 이벤트 하나를 생성합니다.
PrevURL 및 NextURL이 있는 ShowNavigation은 이전/다음 링크를 렌더링합니다. NavButtonClass가 이를 스타일링합니다.
HighlightToday는 TodayClass의 클래스를 사용하여 현재 날짜를 표시합니다.
TableClass, EventDotSize 및 CalendarID가 표 스타일링과 점 크기를 조정합니다.