Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Thisform.refresh() not updating pages in pageframe.
Message
 
To
18/08/1998 16:35:39
Tim Hockin
Illinois State U - Residential Computing
Normal, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00125773
Message ID:
00128054
Views:
113
Ah, the click event...
Sometimes you can't see the answer because your to busy looking around it!
Thanks for the code fragment.

Class Designer.Open() ;)


>>This sounds great Tim,
>>Can I get a little code to peek at?
>
>Sure..I go on the assumption that I should never have more than 32 pages on a frame :)
>
>**************************************************
>*-- Class: basepageframe (h:\tmp\orlbase.vcx)
>*-- ParentClass: pageframe
>*-- BaseClass: pageframe
>*
>DEFINE CLASS basepageframe AS pageframe
>
>
> ErasePage = .T.
> PageCount = 0
> TabStyle = 1
> ActivePage = 0
> Width = 240
> Height = 170
> *-- The last page accessed (for refresh purposes)
> PROTECTED lastpage
> lastpage = 0
> Name = "basepageframe"
>
> *-- Array to determine if a page needs to be refreshed
> DIMENSION pageclean[32]
>
>
> *-- Refresh all Pages now
> PROCEDURE refreshallnow
> LOCAL i
> FOR i = 1 TO THIS.PageCount
> THIS.Pages(i).REFRESH()
> ENDFOR
>
> THIS.markAllClean()
> ENDPROC
>
>
> *-- Mark All Pages as dirty
> PROCEDURE markalldirty
> LOCAL i
>
> FOR i = 1 TO THIS.PageCount
> THIS.PageClean[i] = .F.
> ENDFOR
> ENDPROC
>
>
> *-- Mark all pages as clean
> PROCEDURE markallclean
> LOCAL i
>
> FOR i = 1 TO THIS.PageCount
> THIS.PageClean[i] = .T.
> ENDFOR
> ENDPROC
>
>
> PROCEDURE Click
> * If we changed pages
> IF (THIS.LastPage <> THIS.ActivePage)
> * ...And this page needs a refresh
> IF .NOT. THIS.PageClean(THIS.ActivePage)
> * Refresh it and mark it as clean
> THIS.Pages(THIS.ActivePage).REFRESH()
> THIS.PageClean(THIS.ActivePage) = .T.
> ENDIF
>
> THIS.LastPage = THIS.ActivePage
> ENDIF
>
> ENDPROC
>
>
> PROCEDURE Init
> ** Adjust the last page to be the current page
> THIS.LastPage = THIS.ActivePage
>
> ENDPROC
>
>
> PROCEDURE Refresh
> IF (THIS.PageCount > 0)
> THIS.MarkAllDirty()
> THIS.Pages(THIS.ActivePage).REFRESH()
> THIS.PageClean(THIS.ActivePage) = .T.
> ENDIF
>
> ENDPROC
>
>
> *-- Notes about this class
> PROCEDURE zreadme
> ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: basepageframe
>**************************************************
If they have you asking the wrong questions,
they don't have to worry about the answers.
-proverbs for paranoids #3
Previous
Reply
Map
View

Click here to load this message in the networking platform