Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Modal form auto close
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00618679
Message ID:
00619219
Views:
24
This message has been marked as a message which has helped to the initial question of the thread.
>>Eric,

>It pretty much does that. Im basically creating a date entry field that has an arrow next to the text field that displays a calendar and allows the user to pick a date.
>

Ahhh... a dropdown-calendar.

I have something like that


From the button's click I do
do FORM SCREEN\DatePick.SCX with this.Parent.txtDatum name CALENDAR

with this.Parent
    CALENDAR.left = .left + ln_Left + ln_BorderWidth
    CALENDAR.top  = .top + .Height + ln_Top + ln_TitleHeight + ln_BorderHeight
    CALENDAR.show
endwith	
In the form's init
lparameters to_Target, td_Start

with this
    .Hide
    .Calendar.Backcolor = .BackColor
    .Width                 = .calendar.Width + (2* .Calendar.Left)

    if vartype(td_Start) = "D"
        .d_Start = td_Start
    endif    

    if vartype(to_Target) = "O" and ! isNull(to_Target)
        .o_Target = to_Target
       
        if vartype(to_Target.Value) = "D" and ! empty(to_Target.Value)
            ld_This = to_Target.Value
        else
            ld_This = .d_Start                
        endif
   endif    
   .....

endwith
In the LostFocus
This.QueryUnload
This.Release
And in the QueryUnload of the form
if vartype(this.o_Target) = "O" and ! isNull(This.o_Target)
    with this.Calendar
        ld_Datum             = date(.Year, .Month, .day)
        this.o_Target.value = iif(ld_Datum <= {^1900-01-01}, {//}, ld_Datum)
        this.o_Target.Refresh
        this.o_Target.SetFocus
    endwith        
endif
this.o_Target = .NULL.

dodefault()
Hope this helps to see through it. Maybe You can use this approach
Regards from Berlin

Frank

Dietrich Datentechnik (Berlin)
Softwarekombinat Teltow (Teltow)

Frank.Dietrich@dd-tech.de
DFPUG # 327
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform