Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the best way to approach the creation of a calendar in winforms?
    primarykey
    data
    text
    <p>I need to develop several calendar type controls in winforms. These calendars are all vertical in nature. The concept is that the calendar will have a column for each day (in a month view), hour (in a day view) or week (in a yearly view). I've attached a sample (rather crude) image of the month view.</p> <p><img src="https://i.stack.imgur.com/lzLCn.png" alt="enter image description here"></p> <p>So far I've had a good crack at this using a table layout panel, with many panels and labels. This works, however it's messy and is very slow to load. It also comes with a raft of problems that I've tried to overcome. I've attached a screenshot of how it looks at the moment.</p> <p><img src="https://i.stack.imgur.com/4rTNd.png" alt="enter image description here"></p> <p>I've come up against problems in rendering (the well known stuttering problem), which I've gotten over by hiding the grid while its being built, and then showing it when its done. Also, I've had problems with getting the table to resize correctly (the number of columns changes depending on the number of days in the month), as you can see in the screenshot the bottom row takes up all space. As you can imagine, this is all very nasty and seems to me to be rather hacky. </p> <p>I've tried WPF a bit to see if I can overcome the problems, but it seems that though it may render a bit better, the issues with columns and row sizing are the same. Is there some other approach I could take to avoid these issues, or is it best to bite the bullet and just switch to WPF? I find it double frustrating because it would be quite an easy job to get this done in HTML using a table. </p> <p>To reiterate the issues that I'm having are:</p> <ol> <li>Columns are not automatically resizing as I would expect (the last column just fills the space making for some odd UI)</li> <li>Rows are similar, with the bottom row taking up all the empty space.</li> <li>Slow rendering</li> <li>When re-sizing the control have to hide the grid otherwise get lots of stuttering</li> <li>The hacky nature of the table layout panel</li> </ol> <p>I appreciate any feedback users have on how I should best approach the problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload