Olá @New Nerd Bom dia
Eu peguei o exemplo do fórum que eu achei.
unit Agenda;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, XPMan, ComCtrls, ExtCtrls, StdCtrls, Menus, Mask, ActnMan, ActnColorMaps, Grids, Buttons, DBCtrls;type TFormAgenda = class(TForm) StringGridCal: TStringGrid; MonthCalendar1: TMonthCalendar; BitBtn1: TBitBtn; DBRichEditComp: TDBRichEdit; LabelComp: TLabel; procedure FormCreate(Sender: TObject); procedure BitBtn1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var FormAgenda: TFormAgenda;implementationuses MenuPrincipal, ProjetoSistemaTCC;{$R *.dfm}procedure TFormAgenda.FormCreate(Sender: TObject);beginend;procedure TFormAgenda.BitBtn1Click(Sender: TObject);vardays: array[0..6] of string;i, iNumDays, iDay: Integer;iRowCtr, iColCtr: Integer;begindays[0] := 'Sun';days[1] := 'Mon';days[2] := 'Tue';days[3] := 'Wed';days[4] := 'Thu';days[5] := 'Fri';days[6] := 'Sat';with StringGridCal dobeginfor i := 0 to 6 doCells[i, 0] := days[i]end;// pegar o número de diasiNumDays := MonthDays[IsLeapYear(2016), 2];ShortDateFormat := 'dd/mm/yyyy';iDay := DayOfWeek(StrToDate('01/02/2016'));iRowCtr := 1;iColCtr := iDay - 1;for i := 1 to iNumDays dobeginStringGridCal.Cells[iColCtr, iRowCtr] := IntToStr(i);Inc(iColCtr);if iColCtr > 6 thenbeginiColCtr := 0;Inc(iRowCtr);end;end;end;end.
Quando executo ele, a StringGrid vem vazia e só "pega" os dias quando se aperta o botão.
Se eu ver que estiver muito complexo, vou tentar fazer essa agenda de outro jeito porque tenho outra tela que ainda não fiz e não tenho muito tempo disponível até entregar esse projeto.
Ta bem simples porque eu ainda to aprendendo, então releve as noobices.
Obrigada pela resposta