Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling selected objects for later restore
Message
 
À
05/09/2006 19:37:47
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01151156
Message ID:
01151198
Vues:
38
James,

Thanks for your reply and suggestion.

I am thinking that I should place this in the button init class:
* not tested.
commandbutton init()
if type("thisform.ldisablebuttons") = "L"
bindevent(thisform,"ldisablebuttons",this,runeventcode,1)
endif
But where do I place this:
procedure runeventcode()
  this.enabled = not thisform.ldisablebuttons
endproc
I am using the forms designer but I am unsure where the last section goes as I don't seem to be able to create a custom method in the button class. I guess I am not too good with OOP.

BTW, will this turn ALL buttons off then ALL buttons on. This maybe not what i want as some buttons will be enabled and others disabled in the calling form. I was thinking of looping through all buttons to get their state, saving them into an array, then restoring the state on closure of the called form.

What do you think?

Rex

>Rex,
>
>You can use bindevent()
>
>
>* not tested.
>commandbutton init()
>if type("thisform.ldisablebuttons") = "L"
>bindevent(thisform,"ldisablebuttons",this,runeventcode,1)
>endif
>
>procedure runeventcode()
>  this.enabled = not thisform.ldisablebuttons
>endproc
>
>
>
>then all you have to do is set ldisablebuttons = .t. when calling the form and then .f. when called form is closed.
>
>>Regards...Rex
Rex Toomey
ISD Port Macquarie NSW
Australia

'Inside every older person is a younger person wondering what happened.'
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform