Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controls hide when the form is activated
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00451908
Message ID:
00453475
Views:
27
Further checking found that the problem will happen even if the Column Controlsource is set to just a Field Name.

There appears to be some problem with the controls refreshing because I put some test code in a control's refresh method. It fired but the value shown in the control did not change. This happens on an irregular basis.

I read somewhere that the SetAll method caused memory leaks if used often. I use the SetAll Method to trigger the refresh methods of the appropriate controls from the grid AfterRowColChange method. I wonder if this is having some strange side effect.
Procedure AfterRowColChange
   .Parent.SetAll("nRefreshIf",3)
EndProc


Procedure lRefreshIf_Assign
  LParameter lnRefreshIf
  Return This.nRefreshLevel=lnRefreshIf.And.This.Refresh()
EndProc
Simon

>Hi Marc
>
>Neither ThisForm.refresh nor DoEvents fixes the problem. I have been doing some experimenting and found that it is related to the expression I use in a grid Column. I have a grid column that uses the following expression in the controlsource:
>
>ThisForm.LongDate(FPGames.DepDate)+' '+ThisForm.GetTime(FPGames.DepTime)+' '+Left(ThisForm.dCSeek(FPGames.VenueID,"FPVenues","ID","FPVenues.Id1"),18)
>
>The dCSeek functions performs a normal seek and returns FPVenues.ID1 from the found item.
>
>If I replace the expression with a shorter one there is no problem. Both of these expressions work fine:
>
>ThisForm.LongDate(FPGames.DepDate)+' '+ThisForm.GetTime(FPGames.DepTime)
>
>or
>
>ThisForm.dCSeek(FPGames.VenueID,"FPVenues","ID","FPVenues.Id1")
>
>
>However, when I use both together I get intermitent display problems. The textboxes, comboboxes, spinners and check boxes all display properly, but the labels, shapes and pageframe and command buttons are not visible. If click on the location where I know a command button exists it activates and displays. If I click on the window frame to change the window from maximized to normal everything redisplays properly.
>
>I will have to do some more digging to try and pin this down further. The problem still happens in VFP 7 beta because I tested it.
>
>
>Thanks
>Simon White
>
>
>
>
>>Refreshing problem??? Try THISFORM.refresh or DoEvents
>>(after your last execution)
Simon White
dCipher Computing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform