Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Shortcut menu on EditBox
Message
De
19/01/2009 14:08:08
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00610274
Message ID:
01375189
Vues:
45
This message has been marked as a message which has helped to the initial question of the thread.
You did put the code in the keypress of the editbox ?

I did not test with a search form. If the search for is Modal - then the menu is disabled...


>Hi Gregory,
>
>I've implemented the first version of the code and I observe the strange behavior. When I open the page with the notes field and right click, everything is OK. When I try to do Ctrl+F without rightclick the next time, the window goes behind the search form, e.g. it looks like the Ctrl+F for the search now takes precedence.
>
>Do you know how to solve this problem?
>
>Thanks again.
>
>>>>
>>>>
>>>>We know
>>>>(1) CTRL+F does a find - not difficult to implement
>>>>(2) On the find menu, there's a next
>>>>
>>>>
>>>>You may want to change the key values
>>>>
>>>>&& (1) RightClick - see two last bars
>>>>
>>>>DEFINE POPUP ccp SHORTCUT RELATIVE from mrow(),mcol()
>>>>
>>>>
>>>>DEFINE BAR _med_cut OF ccp PROMPT "Cu\<t" ;
>>>>	KEY CTRL+X, "Ctrl+X" ;
>>>>	MESSAGE "Removes the selection and places it onto the Clipboard"
>>>>	
>>>>DEFINE BAR _med_copy OF ccp PROMPT "\<Copy" ;
>>>>	KEY CTRL+C, "Ctrl+C" ;
>>>>	MESSAGE "Copies the selection onto the Clipboard"
>>>>	
>>>>DEFINE BAR _med_paste OF ccp PROMPT "\<Paste" ;
>>>>	KEY CTRL+V, "Ctrl+V" ;
>>>>	MESSAGE "Pastes the contents of the Clipboard"
>>>>	
>>>>DEFINE BAR _med_slcta OF ccp PROMPT "Se\<lect All" ;
>>>>	KEY CTRL+A, "Ctrl+A" ;
>>>>	MESSAGE "Selects all text or items in the current window"
>>>>
>>>>define bar _MED_FIND of ccp prompt '\<Find' ;
>>>>	key CTRL+F, 'Ctrl+F' ;
>>>>	message 'Finds text in the current window'
>>>>
>>>>define bar (cntbar('ccp')) + 1 of ccp prompt 'Find Nex\<t' ;
>>>>	key CTRL+T, 'Ctrl+T' ;
>>>>	message 'Find Next'
>>>>
>>>>on selection bar (cntbar('ccp')) of ccp ;
>>>>	Keyboard "{CTRL+F}{ALT+N}" plain clear
>>>>	
>>>>activate popup ccp
>>>>
>>>>release popup ccp
>>>>
>>>>
>>>>
>>>>&& (2) KeyPress
>>>>LPARAMETERS nKeyCode, nShiftAltCtrl
>>>>
>>>>if( inlist(m.nShiftAltCtrl, 2) and  inlist(m.nKeyCode, 20) )
>>>>	NODEFAULT
>>>>	keyboard "{CTRL+F}{ALT+N}" plain clear
>>>>endif
>>>>
>>>
>>>Looks like we don't need Find Next, Find dialog seems to work by itself.
>>>
>>>Thanks a lot again, Gregory.
>>
>>
>>I would have said - but you don't need it any more - that you can drive 'Find Next' with ctrl+N
>>
>>
>>try  && get rid of ALT-N (file/new)
>>	release bar  _MFI_NEW of _MSM_FILE
>>catch
>>
>>endtry
>>
>>DEFINE POPUP ccp SHORTCUT RELATIVE from mrow(),mcol()
>>
>>
>>DEFINE BAR _med_cut OF ccp PROMPT "Cu\<t" ;
>>	KEY CTRL+X, "Ctrl+X" ;
>>	MESSAGE "Removes the selection and places it onto the Clipboard"
>>	
>>DEFINE BAR _med_copy OF ccp PROMPT "\<Copy" ;
>>	KEY CTRL+C, "Ctrl+C" ;
>>	MESSAGE "Copies the selection onto the Clipboard"
>>	
>>DEFINE BAR _med_paste OF ccp PROMPT "\<Paste" ;
>>	KEY CTRL+V, "Ctrl+V" ;
>>	MESSAGE "Pastes the contents of the Clipboard"
>>	
>>DEFINE BAR _med_slcta OF ccp PROMPT "Se\<lect All" ;
>>	KEY CTRL+A, "Ctrl+A" ;
>>	MESSAGE "Selects all text or items in the current window"
>>
>>define bar _MED_FIND of ccp prompt '\<Find' ;
>>	key CTRL+F, 'Ctrl+F' ;
>>	message 'Finds text in the current window'
>>
>>define bar (cntbar('ccp')) + 1 of ccp prompt 'Find \<Next' ;
>>	key CTRL+N, 'Ctrl+N' ;
>>	message 'Find Next'
>>
>>on selection bar (cntbar('ccp')) of ccp ;
>>	Keyboard "{CTRL+F}{ALT+N}" plain clear
>>	
>>activate popup ccp
>>
>>release popup ccp
>>
>>
>>
>>&& keypress
>>LPARAMETERS nKeyCode, nShiftAltCtrl
>>
>>if( inlist(m.nShiftAltCtrl, 2) and  inlist(m.nKeyCode, 14) )
>>	NODEFAULT
>>	keyboard "{CTRL+F}{ALT+N}" plain clear
>>endif
>>
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform