Pergunta

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?

Foi útil?

Solução

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

Outras dicas

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 .

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top