I'm using ScaleBy method to scale up/down Forms of my application at run-time. it works for almost all components but not for TMonthCalendar. Is there a way to enlarge TMonthCalendar using ScaleBy or any other method?

有帮助吗?

解决方案

it works on;y if you disable theme. you also need to make a size change to make it work

SetWindowTheme(MonthCalendar1.Handle, '', '');
MonthCalendar1.ScaleBy(190, 100);
MonthCalendar1.Width := MonthCalendar1.Width + 1;
MonthCalendar1.Width := MonthCalendar1.Width - 1;

Thanks to @Sertac for hints

其他提示

The MonthCalendar control has a fixed size , you can not change this size .. the low width size is definded as 225 px and the High width is definded as 450 px .

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top