Information générale
Catégorie:
Codage, syntaxe et commandes
>Yes, it'd be better to 'encapsulate' your code in the object you're trying to manipulate, it keeps things simple. So put the code in the refresh method for your button. And then on each from each pageframe activate event, call the button bars(not the individual button) refresh method. That should call the refresh method of all your buttons and make sure they reflect the current pageframe. I'm sure there's more coding involved here for you, but I hope that gets you going in the right direction.
Your suggestion about invoking the button refresh was helpful, but in this particular case, I can't figure out a way to implement it by encapsulating the code within the refresh itself. That's because all buttons will then eventually be set as the default on activate after you go to that page. And you can only have one button on a form as the default. So then the form doesn't know which button is the default, and I guess it just assumes the first one is. Because of that I really have to set the default property on/off in the page acti/deactivate event and reverse the process for the button on the other page.
But even doing trying it at the page level, it's not working quite right. I've been able to set the button on the first page as the default after clicking page activate. But I can't seem to get the button on the second page to be the default, even after setting the first button's default property to false in the first page Deactivate.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement