Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Loose StrictDateEntry
Message
From
28/01/2005 14:00:28
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
00981831
Message ID:
00981844
Views:
41
Ni Nadya,

the difference is the Format = "KD". If you remove the "D" you can edit the time.



>Here is my test:
>
>PUBLIC oform1
>
>oform1=NEWOBJECT("form1")
>oform1.Show
>RETURN
>
>
>	**************************************************
>*-- Form:         form1 (c:\mmviscollect\test.scx)
>*-- ParentClass:  form
>*-- BaseClass:    form
>*-- Time Stamp:   01/28/05 01:48:07 PM
>*
>DEFINE CLASS form1 AS form
>
>
>	Top = 17
>	Left = 16
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>
>
>	ADD OBJECT text1 AS textbox WITH ;
>		StrictDateEntry = 0, ;
>		Format = "KD", ;
>		Height = 23, ;
>		Left = 36, ;
>		Top = 48, ;
>		Width = 160, ;
>		Name = "Text1"
>
>
>	PROCEDURE Load
>		SET NOTIFY ON
>	ENDPROC
>
>
>	PROCEDURE text1.Init
>		this.Value = DTOT({})
>	ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: form1
>**************************************************
>
>
>What is the difference?
>
>>Nadya-
>>
>>>I just found, that if StrictDateEntry is set to 0 for the textboxes bound to datetime value, you can not edit time portion of the textbox. Is it the expected behavior? Where it is documented?
>>
>>I don't have the same problem in a simple form with a simple textbox. Are you using a framework? Here's the code I used to try and duplicate the problem:
>>
>>
PUBLIC oform1
>>
>>oform1=NEWOBJECT("form1")
>>oform1.Show
>>RETURN
>>
>>
>>DEFINE CLASS form1 AS form
>>
>>
>>	Caption = "Form1"
>>	Name = "Form1"
>>
>>
>>	ADD OBJECT text1 AS textbox WITH ;
>>		ControlSource = "temp.dt1", ;
>>		Height = 23, ;
>>		Left = 70, ;
>>		Top = 43, ;
>>		Width = 194, ;
>>		Name = "Text1"
>>
>>
>>	PROCEDURE Load
>>		SET strictdate to 0
>>		CREATE TABLE temp (dt1 t)
>>		INSERT INTO temp VALUES (DATETIME())
>>	ENDPROC
>>
>>
>>ENDDEFINE
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform