FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
Marcar Celdas en StringGrid
Buenos días.
Estoy intentando crea un calendario con un StringGrid. En principio ya tengo solucionado casi todos los temas de pintar el calendar y marcar el día actual. El problema surge cuando intento cargar días específicos. Me explico….. Si en el elemento OnDrawCell con el código // wMes = Mes mostrado en calendario Me marca la celda seleccionada en rojo sin ningún problema. El problema surge cuando la carga de los datos intento hacerla de manera dinámica a trabes de una lista de fechas cargadas en un TStringList, De esta segunda manera solo me marca la ultima fecha y al cargar los datos en un listBox para verificar el funcionamiento me repite las lista de fechas una y otra vez. Última edición por ramonibk fecha: 29-08-2011 a las 20:26:25. |
#2
|
||||
|
||||
Hola ramonibk.
Este código debería pintarte las celdas que son acordes con el dia y mes de las fechas cargadas en LstFechas:
Saludos.
__________________
Daniel Didriksen Guía de estilo - Uso de las etiquetas - La otra guía de estilo .... |
#3
|
|||
|
|||
Parece que esta no es la solución.
pues al ejecutar me da el error "list index of bounds 1239256" Os cuento mas o menos todo el proceso pare que me comentéis. Tengo un procedimiento llamado calendario que es quie me pinta eso el calendario. Este procedimiento es cargado ne el create del form. y releído cuando se varia de mes o año y a contibuacion en el OnDrawCell y asta aqui todo es correcto, no hay errores y funciona correctamente. pero cuando intento sustituir. Por he intentado ponerlo por delante de como indica ecfisa en el interior de pero no hay manera y lo único que veo es que el lixbox se vuelve loco Por cierto también he echo que cuando lo haga de manera automática no lea la primera linea ya que al ser esta las letras de día de la semana es cuelga. |
#4
|
|||
|
|||
<<<<<<<<<< RESUELTO >>>>>>>>>>>>
Al final he optado por lo mas sencillo, he tirado todo abajo y he empezado de cero paso a paso. Os dejo el código del OnDrawCell por si a alguno le viene bien o se le ocurre algún arreglo mas.
Última edición por ramonibk fecha: 30-08-2011 a las 10:47:30. |
#5
|
||||
|
||||
Hola ramonibk.
Primero que nada me alegro que lo hayas solucionado. Ahora que veo que valor tienen las celdas del StringGrid, la comparación del código que te puse no puede funcionar ya que supuse que las celdas contienian fechas. Pero adecuando la comparación a celdas con días, funciona igual. Esta es la prueba rápida que hice sobre tu código: Dado que ya solucionaste el problema, te adjunto la prueba sólo como un comentario. Un saludo.
__________________
Daniel Didriksen Guía de estilo - Uso de las etiquetas - La otra guía de estilo .... Última edición por ecfisa fecha: 30-08-2011 a las 13:25:33. Razón: Corregir Identación |
#6
|
|||
|
|||
Ok Muchas gracias por la ayuda.
echo un vistazo a tu código haber si con eso aprendo que no me viene mal. jejejejje |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
Pintar celdas StringGrid | cacu | OOP | 4 | 24-10-2007 17:22:21 |
Marcar varias celdas en un grid. | Trisckel | Varios | 0 | 02-11-2006 17:46:31 |
StringGrid + celdas | Makiley | Varios | 4 | 01-02-2006 13:01:15 |
combinar celdas de StringGrid | VRO | Varios | 2 | 21-04-2005 08:02:16 |
Combinar Celdas Stringgrid | MITOPE | Varios | 0 | 21-04-2004 07:03:27 |
|