views:

366

answers:

1

Hi my name is carlos Im from Brasil. Is it possible to disable the buttons that change the date on the TMonthCalendar(vcl native)?

thanks a lot carlos

+2  A: 

The calendar control is not a native Delphi control, but a wrapped Windows standard control. As such it can only be accessed using the documented interface.

In particular Spy++ reveals that it is a single window, so calling EnableWindow() to disable the navigation buttons seems impossible. What you could do is set the MaxDate and MinDate properties of the VCL control to the first and last day of the interesting month, so the month can't be changed. Unfortunately this will result in an annoying sound when the buttons are clicked.

mghie