Fórum Não consigo Pintar o fundo dos dias de um monthcalendar #266899
31/01/2005
0
Desde já agradeço.
Ocriador
Curtir tópico
+ 0Posts
31/01/2005
Aroldo Zanela
Caso não encontre da forma que deseja, fiz algo parecido com StringGrid. Além de extremamente simples de se manipular, até parece um calendário de verdade. hehehehe
Gostei + 0
31/01/2005
Aroldo Zanela
Caso não encontre da forma que deseja, fiz algo parecido com StringGrid. Além de extremamente simples de se manipular, até parece um calendário de verdade. hehehehe[/quote:dfb62c9e0a]
Posso lhe enviar PVT se desejar. (aroldo_zanela@hotmail.com)
Gostei + 0
31/01/2005
Ocriador
Gostei + 0
31/01/2005
Aroldo Zanela
Amanhã eu lhe envio a rotina (está no meu trabalho) que tenho e você poderá extendê-la da forma que julgar necessário.
Gostei + 0
26/09/2006
Helio Nascimento
Você poderia me fazer a gentileza de enviar-me uma copia para mim deste seu projeto de calendário. Estou necessitando p/concluir um projeto!
Pela sua atenção agradeço-lhe antecipadamente.
sisep@terra.com.br
Hélio
Gostei + 0
27/09/2006
Helio Nascimento
Gostei + 0
27/09/2006
Paullsoftware
paullsoftware@yahoo.com.br
Gostei + 0
28/09/2006
Helio Nascimento
Gostei + 0
02/10/2006
Helio Nascimento
Gostei + 0
02/10/2006
Paullsoftware
Gostei + 0
27/11/2007
Douglas Bitencourt
se puder me enviar por pvt a dica do calendário em string grid agradeço.
estou procurando algo que me ajude em um projeto.
preciso marcar dias de missa em um calendário.
desde já agradecido.
douglas_delate@hotmail.com
abraços,
Douglas
Gostei + 0
28/11/2007
Mssilva
mpssistemas@hotmail.com
Gostei + 0
28/11/2007
Paullsoftware
Gostei + 0
29/11/2007
Mssilva
De pintar um calendário, já consultei bastante o meu goro o google más
Nada que faça o que nosso colega comentou, fiz até o mesmo que ele Também usei um StringGrig.
Só que tem um problema só consegui simular o calendário.
Fazendo tudo na mão fica muito cansativo é todo o ano mudo é como ficam os anos [b:640c199788]Anteriores[/b:640c199788]?
Será que você tem idéia de criar linhas é colunas nele é pintar as células pegando dados de uma tabela?
Pois veja como faço, na mão pode ser até inexperiência minha é se for gostaria que o colega Aroldo me ajuda se a melhorar o código.
Simulando mês de janeiro:
StringGrid1.Cells[0,0]:= ´D´;
StringGrid1.Cells[1,0]:= ´S´;
StringGrid1.Cells[2,0]:= ´T´;
StringGrid1.Cells[3,0]:= ´Q´;
StringGrid1.Cells[4,0]:= ´Q´;
StringGrid1.Cells[5,0]:= ´S´;
StringGrid1.Cells[6,0]:= ´S´;
StringGrid1.Cells[0,1]:= ´´;
StringGrid1.Cells[0,2]:= ´7´;
StringGrid1.Cells[0,3]:= ´14´;
StringGrid1.Cells[0,4]:= ´21´;
StringGrid1.Cells[0,5]:= ´28´;
StringGrid1.Cells[1,1]:= ´1´;
StringGrid1.Cells[1,2]:= ´8´;
StringGrid1.Cells[1,3]:= ´15´;
StringGrid1.Cells[1,4]:= ´22´;
StringGrid1.Cells[1,5]:= ´29´;
StringGrid1.Cells[2,1]:= ´2´;
StringGrid1.Cells[2,2]:= ´9´;
StringGrid1.Cells[2,3]:= ´16´;
StringGrid1.Cells[2,4]:= ´23´;
StringGrid1.Cells[2,5]:= ´30´;
StringGrid1.Cells[3,1]:= ´3´;
StringGrid1.Cells[3,2]:= ´10´;
StringGrid1.Cells[3,3]:= ´17´;
StringGrid1.Cells[3,4]:= ´24´;
StringGrid1.Cells[3,5]:= ´31´;
StringGrid1.Cells[4,1]:= ´4´;
StringGrid1.Cells[4,2]:= ´11´;
StringGrid1.Cells[4,3]:= ´18´;
StringGrid1.Cells[4,4]:= ´25´;
StringGrid1.Cells[4,5]:= ´´;
StringGrid1.Cells[5,1]:= ´5´;
StringGrid1.Cells[5,2]:= ´12´;
StringGrid1.Cells[5,3]:= ´19´;
StringGrid1.Cells[5,4]:= ´26´;
StringGrid1.Cells[5,5]:= ´´;
StringGrid1.Cells[6,1]:= ´6´;
StringGrid1.Cells[6,2]:= ´13´;
StringGrid1.Cells[6,3]:= ´20´;
StringGrid1.Cells[6,4]:= ´27´;
StringGrid1.Cells[6,5]:= ´´;
Pintando as células que necessito:
if (ACol = 1) and (ARow = 1)
then StringGrid1.Canvas.Brush.color := clFuchsia;
if (ACol in [0..6]) and (ARow in [3..8])
then StringGrid1.Canvas.Brush.color := clInfoBk;
if (ACol = 0) and (ARow = 3)
then StringGrid1.Canvas.Brush.color := clWindow;
if (ACol = 3) and (ARow = 5)
then StringGrid1.Canvas.Brush.color := clMenuHighlight;
if (ACol = 4) and (ARow = 5)
then StringGrid1.Canvas.Brush.color := clWindow;
if (ACol = 5) and (ARow = 5)
then StringGrid1.Canvas.Brush.color := clWindow;
if (ACol = 6) and (ARow = 5)
then StringGrid1.Canvas.Brush.color := clWindow;
if (ACol = 0) and (ARow = 1) then
StringGrid1.Canvas.Brush.color := clWindow;
begin
//Pintando o Fundo
StringGrid1.canvas.fillRect(Rect);
//Pintando o Texto.
StringGrid1.canvas.TextOut(Rect.Left,Rect.Top,StringGrid1.Cells[ACol,ARow]);
Da muito trabalho, será que tem como melhorar isso?
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)