Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Redraw property or multi day style setting

Looking for an undocumented feature here.

Is there a redraw or refresh type property for the datepicker?
I am setting the daystyle property day by day as any particular day could have a different appearance so date ranges won't work.
At the moment I'm only displaying up to 3 months at a time so it's not too bad watching the calendar paint itself.

Moving forward though I'd like to be able to display a year at a time so I was hoping there was some means of speeding up the painting process much like other controls where you can turn off the drawing of the control until you've set all the properties you want and then turn them back on again to display the finished result.


  • Mark - I am guessing there isn't any undocumented property here. Kevin is on holiday this week so I won't know for sure until he returns, but since he didn't respond right away I interpreted that as a negative response. What happens if you just set the form's REDRAW property to 0 and then to 1?
  • For my own curiosity I had setup a window that had two years worth of data showing and it was like watching an 80's arcade game. Pop, pop, pop. I had the urge to hit the coloured dots with a rubber mallet.

    I changed the code to build an array of ctrls, daystyleprops, and values and then made just one set_property call to see if that would improve things. It did but had the interesting effect of starting out painting one by one by one and then at an arbitrary point say about halfway, the rest of the dates would show in one flash.

    Your suggestion Don, simple as it was, was the magic solution. Window redraw off. Window Redraw on. Instantaneous!
  • I'm glad that worked out well for you. I don't think I've populated that many dates in the DatePicker control before, but we face this issue with the Schedule control quite frequently. We consider best practice to populate a little bit in the past and in the future (mileage will vary depending on the total number of items involved) and then add more as the view changes. I take it this is what you were doing originally.
  • Just experimenting with possibilities.
    Would very much like to replace an existing window that was built on the old OI popup_year.

    Looks very dated and is rather tedious to use but it shows an entire calendar year. Need at the very least to show that much. The redraw off/on means I can show more.
Sign In or Register to comment.