Subject Re: ok button missing in datecalendar.cc
From Mervyn Bick <invalid@invalid.invalid>
Date Sat, 11 Nov 2023 13:52:29 +0200
Newsgroups dbase.getting-started

On 2023/11/06 20:00, Ken Mayer wrote:
> On 11/6/2023 6:48 AM, Charlie wrote:
>> Yes I missed that but I do now remember it from before.  But I am
>> still missing the button on the bottom of the calendar.
>
> 1) Remove the component completely from the form.
> 2) Set the form's metric to 6 (Pixels)
> 3) Put the component back on the form.
> 4) If you need to reset the form's metric to the default (Character) do
> so here ...
>
> Ken
>

I'm afraid one can't save the form with anything other than the metric
set to pixels.  When the form opens a calculation is made as to where
the calendar form should open.  This calculation needs pixel values.  If
the form was saved with any other metric dBASE will have replaced these
values and the calendar will not be visible.

As an aside, the calculation to determine where the calendar should be
placed (immediately below the container and with the left sides aligned)
is made in the control's overwritten  form_open() method.  This means
that if the form is moved, as was the case in Charlie's screenprint, the
calendar no longer appears immediately below the control on the main
form.  It would be better if the calculation was made in the
GETCALBUTTON_ONCLICK event handler.

Mervyn.