Problem with controls operating differently!

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
rcain
Posts: 8
Joined: Fri Oct 17, 2008 1:54 am

Problem with controls operating differently!

Post by rcain »

Roberto or Anyone, :o

I am having a great time, relearning Clipper coding....
I am using the IDE to create screens, and have found that I need to write very little code!

I have come across one problem. or an difference in the way two controls work.
I am setting the FIELD property on TEXTBOX and DATEPICKER at design time.

The sequence of steps is as follows:

Function Process_Family_Members()

Load Window frmFamily_member

frmFamily_member.Center

DBGOTO(Recno)

frmFamily_member.Activate

Return Nil


When the screen is displayed, all fields contain data from the record, except
DATEPICKER, it contains the current date, no matter what is in the record.

If however, I execute the method:

frmFamily_member.txtDate1.Refresh && DATEPICKER Field
or if I load the value with:
frmFamily_member.txtDate1.Value := PEOPLE->Date1

after the DBGOTO command, the correct data will be displayed in the DATEPICKER
field on the screen.

The TEXTBOX controls work without the REFRESH method!

The work around is simple, but just something I have to remember to do…

Thanks for all of your work,

Robin D. Cain :o
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Problem with controls operating differently!

Post by Roberto Lopez »

rcain wrote:Roberto or Anyone, :o

I am having a great time, relearning Clipper coding....
I am using the IDE to create screens, and have found that I need to write very little code!

I have come across one problem. or an difference in the way two controls work.
I am setting the FIELD property on TEXTBOX and DATEPICKER at design time.

The sequence of steps is as follows:

Function Process_Family_Members()

Load Window frmFamily_member

frmFamily_member.Center

DBGOTO(Recno)

frmFamily_member.Activate

Return Nil


When the screen is displayed, all fields contain data from the record, except
DATEPICKER, it contains the current date, no matter what is in the record.

If however, I execute the method:

frmFamily_member.txtDate1.Refresh && DATEPICKER Field
or if I load the value with:
frmFamily_member.txtDate1.Value := PEOPLE->Date1

after the DBGOTO command, the correct data will be displayed in the DATEPICKER
field on the screen.

The TEXTBOX controls work without the REFRESH method!

The work around is simple, but just something I have to remember to do…

Thanks for all of your work,

Robin D. Cain :o
Could be so kind to post a complete sample, including data file, to allow to me to test?

TIA.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
Post Reply