Não consigo Pintar o fundo dos dias de um monthcalendar
Se puderem me ajudar preciso pintar os dias de um monthcalendar, como um calendario escolar onde pinto de azul dias letivos, amarelo feriados, vermelho programação escolar etc.
Desde já agradeço.
Desde já agradeço.
Ocriador
Curtidas 0
Respostas
Aroldo Zanela
31/01/2005
Colega,
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
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
Aroldo Zanela
31/01/2005
[quote:dfb62c9e0a=´Aroldo Zanela´]Colega,
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)
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
Ocriador
31/01/2005
Legal, se puder ver http://www.feob.br/novo/servicos/calendario-inc.php isso já é lendo a base, preciso gravar os dados por isso estou querendo ou tentando montar para gravar no banco. Como faz para aparecer o ano todo dentro do stringgrid?
GOSTEI 0
Aroldo Zanela
31/01/2005
Colega,
Amanhã eu lhe envio a rotina (está no meu trabalho) que tenho e você poderá extendê-la da forma que julgar necessário.
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
Helio Nascimento
31/01/2005
Aroldo
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
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
Helio Nascimento
31/01/2005
sobe.
GOSTEI 0
Paullsoftware
31/01/2005
se puder me enviar eu hospedo e ponho o link aqui para todos os interessados baixarem... :wink:
paullsoftware@yahoo.com.br
paullsoftware@yahoo.com.br
GOSTEI 0
Helio Nascimento
31/01/2005
sobe
GOSTEI 0
Helio Nascimento
31/01/2005
sobe
GOSTEI 0
Paullsoftware
31/01/2005
é pelo visto não é tão simples assim como eu pensei..
GOSTEI 0
Douglas Bitencourt
31/01/2005
Caro Aroldo,
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
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
Mssilva
31/01/2005
Aroldo penho o mesmo problema se poder me envie:
mpssistemas@hotmail.com
mpssistemas@hotmail.com
GOSTEI 0
Paullsoftware
31/01/2005
Aroldo penho o mesmo problema se poder me envie:
mpssistemas@hotmail.com
Até hoje eu espero...GOSTEI 0
Mssilva
31/01/2005
Bem colega já que comentou tenho a mesma necessidade
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?
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