Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Store column settings in a grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00216330
Message ID:
00216522
Vues:
27
Josh,

I was wondering about that. I did solve the other problem by using macro expansion of the whole This. part like this...

SELECT User

LOCATE FOR User.FormName = ThisForm.Name
DO WHILE FOUND( )
lcColOrder = "This." + ALLTRIM(User.Name) + ".ColumnOrder"
&lcColOrder = User.ColumnOrder
lcColOrder = "This." + ALLTRIM(User.Name) + ".Width"
&lcColOrder = User.Width
CONTINUE
ENDDO


>John,
>
>The help for QueryUnload says:
>
>The QueryUnload event occurs before the Destroy event. The ReleaseType property is set prior to the QueryUnload event being called.
>
>The QueryUnload event occurs when CLEAR WINDOWS, RELEASE WINDOWS, or QUIT is executed in code, when the user double-clicks the Control-menu box, or when the user chooses Close from the Control-menu on a form.
>
>Note The QueryUnload event does not occur if you issue the RELEASE command on the form in code or invoke the form's Release method.
>
>Issuing NODEFAULT in the QueryUnload event procedure prevents the form from unloading.
>
>The purpose of QueryUnload is mainly to trap when the form is closed by some other means than an explicit release. Generally when the user closes the form by clicking the close box or by closing the application. If you want something to happen every time the form closes you should use Destroy or Unload. I don't think Unload will work in this case because all of the objects on the form (including your grid) are released before the Unload event is called.
>
>>Hi John,
>>
>>Would the Destroy event be the same as the QueryUnload? I see that the QueryUnload is not called if you invoke the forms Release method, could this be a potential problem?
>>
>>Thanks
>>
>>>Hi John ---
>>>
>>>There's no easy answer to this. You could store these properties to a table on QueryUnload and restore them at Form Init. Or substitute the table for registry settings or INI settings.
>>>
>>>
>>>>How can I store the ColumnOrder and Width when the user modifies a grid?
>>>>
>>>>Thanks
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform