Putting a Calendar in a customized vertical tab setting. C# - Winform
-
09-03-2021 - |
Question
Hello so I have a customized vertical tab using the drawitem. However I can't put something in the tab control strip. I want to put a calender there so that I can utilize the free space however the tab-control doesn't let me do that. Is there a possible way of doing that thing?
*here's the image attached
**I want it to look like this but in a vertical format so that I can utilize the empty space in photo 1
Solution
The simplest way is to not add it to the Tab Control. Just add the control to the form, but make sure it sits on top of the Tab Control:
Simple example:
MonthCalendar mc1 = new MonthCalendar();
this.Controls.Add(mc1);
mc1.Location = new Point(0, this.ClientSize.Height - mc1.Height);
mc1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
mc1.BringToFront();
OTHER TIPS
Make another control, that has your table control at the top and the calendar at the bottom, put that on your main form.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow