Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
17-MAY-2004 Date format
Message
From
18/05/2004 11:21:04
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00904674
Message ID:
00904954
Views:
20

This approch has solved half the problem.

The textbox is still edited in the dd-mm-yyyy but display dd-mmm-yyyy.

Thanks.


This is the max that VFP can do for you.

If you want a dd-mmm-yyyy edit mode you must write a myDateTextBox with
a string Value and a full control on KeyPress event.

This is not hard for a standalone control, a raw start trace code:
* GotFocus
this.Comment = m.this.Controlsource 
this.Controlsource = ''
this.Value = m.this.Text
this.Tag   = m.this.Value

* interactive change code
IF VARTYPE(CTOD(STUFF(m.this.Value,4,3,STR(ATC(SUBSTR(m.this.Value,4,3),"  JENFEBMARAPRMAY...")/3,2))))=="D"
 this.Tag   = m.this.Value
ELSE
 this.Value = m.This.Tag
ENDIF

* Valid
vValue = CTOD(STUFF(m.this.Value,4,3,STR(ATC(SUBSTR(m.this.Value,4,3),"  JENFEBMARAPRMAY...")/3,2)))
this.Controlsource = m.this.Comment
this.Value = m.vValue
But write a gridable control binded to a true field date is possible, but it is very hard.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform