Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh gets aborted by ZOrder
Message
De
14/10/2015 14:05:06
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01625937
Message ID:
01625945
Vues:
48
>>
>>>define class myOtherContainer as Container
>>>	add object myLabel as label with Caption = '*', left = 1, top = 1, border=0
>>>	procedure Refresh() as VOID
>>>		this.myLabel.Caption = IIF(this.myLabel.Caption = '*', 'I', 'R')
>>>		Container::Refresh
>>>	endproc
>>>enddefine
>>>
>
>Hi Fabio, program would work well if not for the call to ZOrder, and is not related to caption, the sequence chain is broken, my original problem had nothing to do with a label, I used a label here for demonstration purposes only, in my case the refresh just changed the back color of the container and then changed some properties, but as soon as you have a ZOrder in the refresh of one of the inner objects, the refresh ends abruptely.
>
>Without ZOrder:
>
>
>Parent Container -> REFRESH()
>	Child 1 -> REFRESH() && Does whatever it needs except calling ZOrder(0)
>	Child 2 -> REFRESH() && Does whatever it needs except calling ZOrder(0)
>	Child 3 -> REFRESH() && Does whatever it needs except calling ZOrder(0)
>	...
>	Child n -> REFRESH() && Does whatever it needs except calling ZOrder(0)
>	
>* All childs are refreshed, Hugo is very happy
>
>
>With ZOrder
>
>Parent Container -> REFRESH()
>	Child 1 -> REFRESH() && There is a ZOrder(0) in the Refresh of Child 1
>
>* Refresh finishes, Hugo is ashamed in front of the vice-president of the company!	
>


Refresh do the task with Control's index order, because control index = Zorder,
then the last index = ControlCount it is the last refreshed member.

object.ZOrder(0) set the object index to ControlCount, then Refresh process finished.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform