Le forum (ô combien francophone) des utilisateurs de Powerbuilder.
Bonjour,
J'ai voulu savoir comment gérér les bontons du clavier càd ja vais parexemple quand je clique sur le bouton F4 le programme m'affiche un messagebox
Merci d'avance
Dernière modification par infopower (03-08-2011 09:39:51)
Hors ligne
Merci de faire l'effort de poster au bon endroit: ce genre de topic n'a rien à voir avec la rubrique "les news du forum"
Hors ligne
Pardon Est ce que tu peux m'expliquer ou je peux le mettre (choisir l'endroit) svp
Hors ligne
C'est fait, sujet déplacé. La rubrique "powerscript" semble plus appropriée pour ce genre de question.
Pour répondre à celle-ci, je te conseille de rechercher dans l'aide PB et ce forum l'évènement "key" et la fonction "keydown"
Hors ligne
Merci bq pour ta reponse
Hors ligne
De rien, mais, s'il te plaît, pourrais-tu mettre le [RESOLU] en majuscule? C'est plus lisible pour visualiser les sujets clôturés.
Merci d'avance.
Hors ligne
infopower
j'espere que vou pouvez lire anglais un peut, je suis plus comfortable avec l'anglais.
To capture the keys being pressed you'll need an event mapped to the pbm_dwnkey eventid
This what we do
1 - create an user event called ue_key, mapped to the pbm_dwnkey
2 - use the KeyDown function/method to grab what key or keys are being pressed then do actions accordingly.
here is an example where a user can press the F5 key torefresh the data, like many other windows apps.
u_dw ldw_master long lrow If KeyDown(KeyF5!) then long ll_claim_id ll_claim_id = iw_parent.istr_name_id.claim_id setPointer(hourglass!) this.retrieve(ll_claim_id) setPointer(arrow!) END IF IF keydown(keyInsert!) and keyflags = 2 then THIS.trigger event pfc_addrow() END IF IF keydown(keydelete!) and keyflags = 2 then THIS.trigger event pfc_deleterow() END IF
if you can't understand what i said, let me know and I'll try to translate with my limited knowledge of french computer terms...then again if you can't read this, you won't be able to let me know that you can't :-)
Chris
Dernière modification par cfauvel (27-07-2011 02:14:47)
Hors ligne
Thank you Chris, but don't forget to use the code=pb tag, please.
Hors ligne
foon a écrit:
Thank you Chris, but don't forget to use the code=pb tag, please.
Don't quite understand what you mean, sorry. Please explain, what you are looking for from me.
Code = PB tag?
Thanks
Chris
Hors ligne
foon a écrit:
Thank you Chris, but don't forget to use the code=pb tag, please.
Ahh I think I got what you were asking from another post. my response was edited.
Cheers
Hors ligne
Perfect Chris. Thanks
Hors ligne
for all
Hors ligne