Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Date and Datetime Pickers Update
Message
De
25/07/2002 07:53:40
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00681524
Message ID:
00682434
Vues:
27
Hi Michael,

I'm not quite clear about your situation about using the control "in the main window." What do you mean here? I have tested the control on modal, non-modal and top level forms and have not seen any specific problems ( at least that I know of :-) ).

I ran a few quick tests on the control and when the control source was blank I did not see any problems. There is a logical property on the control, lallowblankdate, to allow users to enter blank dates and if the control source can contain blank dates I would make sure this property is set to .T.

I also noted that if you set the control source to .NULL., the display portion of the control does indeed diaplay ".NULL." for the value. I do not remember specifically addressing NULL values in the control ( guess you can't think of everything :-) ) but my advice at this point would be to test the control source and make sure it contains at least a "blank" value or if you really want to handle NULL values, modify the textbox portion of the control to specifically account for this condition. One simple, quick way may be to modify the ddate_assign method of the vfpdatepicker class to test for NULL and assign, possibly, a blank date ( or whatever is appropriate ) to the control value. I don't currently have a specific need to handle NULL values since I try to make sure dates are either date or blank, and I'm pretty busy on some things so I can't take time at the moment to look at it. If I get time at some point I will try to look into this issue for the long term. Also, I believe several people here use the control so maybe someone else has encountered this specific issue already and can offer additional insight. Just out of curiosity, what do you think would be an appropriate manner for a control of this type to handle a NULL value?

Bill

>Bill, I'm having a little trouble using the control. I have it working successfully in a modal form (it's great - thank you), but not in the main window.
>
>I have the controlsource set to an object property, which is a date value - but upon form instantiation, the value is likely to be blank or null. Is it possible that this is breaking the class?
>
>The symptom is that the displayed value of the control is ".NULL." I have used the VFP debugger to verify the controlsource property, and the value of the object property used as the controlsource.
>
>Help!
>
>>For those of you using my VFP Date and Datetime Pickers classes, I have uploaded a new set of the classes called VFPX Date and Datetime Picker classes stored in DatePickX.zip. This is a 100% VFP solution to the date and datetime picker issue. Functionality is the same as the original classes but the MS MonthView ActiveX control used on the original date and datetime pickers has been replaced with a VFP Calendar class. The Calendar class was designed to be visually similar to the MonthView control and has similar basic functionality. This class is housed in its own class library wich can also be instantiated as a standalone Calendar. A subclass of the Calendar class is also included which has some automatic resizing capability to be used in standalone Calendar scenarios. Documentation for the Calendar class is included for ease of use and extensibility.
>>
>>The purposes of creating this new class are to relieve some of the issues some have experienced regarding deploying and instantiating the ActiveX control and also since the Calendar class is fully VFP it can be modified, subclassed or given as much extended functionality as required by the developer. The Calendar control was developed specifically to replace the MS MonthView control on the date and datetime picker class so it does not have the same range of functionality as the MonthView control. On the other hand, since it is VFP, developers will be able to give it all the functionality they need for their particular situations.
>>
>>If you do use it, I hope you find it useful. :-)
>>
>>Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform