Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2003 Server
>I have a mover container based class with 4 buttons (and drag-drop functionality). The buttons to move one item call MoveOne method of the container class (with appropriate parameters to indicate direction) and buttons to move all items call MoveAll method.
>
>My problem is that I need to execute some code when I move items from left to right and then I remove items from right to left.
I would suggest adding some custom event methods.
OnMoveRight(tnIndex)
OnMoveRightAll()
OnMoveLeft(tnIndex)
OnMoveLeftAll()
Then in your MoveOne method call the OnMoveLeft() passing the index of the item being moved (moving right to left). Similar for your method that moves left to right call the OnMoveRight() passing index. In your moveall call the appropriate OnMove...All() method.
Then the On... methods are used by the enduser to code any additional logic at the implementation level. These methods are public and your methods are private to the class.
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