Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hot keys for buttons
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00665597
Message ID:
00666183
Vues:
24
Hi Vlad,

It looks like this problem is fixed. Uf :) I'm getting so tired of this Data Entry application...

Anyway, now I have another little problem. I have a Lookup form. This form has a listbox. I want ListBox and a form to be automatically resized depending on number of items in listbox and the max width of the listbox item.

I was trying to use FontSize, but it's in points, and form's height in pixels. I sent this form to your e-mail address (clicked on envelope).

Do you have ideas before I get insane? :)

Thanks a million.

>Hi!
>
>I also go for option to use Cancel=.T. for button. It does not matter that field value changes are lost when user press ESC key - you will cancel anyway, and in most interfaces pressing cancel does not prompt user for confirmation. So, wonder why this is an issue?
>
>BTW, This is also a common problem (like it was with value of field not saved when saving data from toolbar or hotkey that we discussed in recent thread). And, as usual, many frameworks has workarounds for this.
>
>In our framework we created special generic approach for this, but we did not dived so deep into generalizing things. We have a propery to specify Cancel button object location (starting from thisform object). Then we just had a generic method in the form class that using coordinates of mouse and coordinates of button determine if that button is pressed by mouse. Also, check for all other things like ESC or hotkey or whatever. Remember that Cancel button could go with image, as well as a hot key for it could be not always "C".
>
>
>>Hi everybody,
>>
>>How can I find out, if button has a Hot Key (letter highlighted) and what's the value of it. Say, I have Cancel button with first letter highlighted. I added in my CancelValidation method of the form:
>>
>>
>>********************************************************************
>>*  Description.......: CancelValidation
>>*  Calling Samples...:
>>*  Parameter List....:
>>*  Created by........: John Koziol
>>*  Modified by.......:
>>********************************************************************
>>local nCancelTop,nCancelHeight,nCancelLeft,nCancelWidth, llReturn
>>nCancelTop=thisform.cmdCancel.top
>>nCancelBottom=m.nCancelTop+thisform.cmdCancel.height
>>nCancelLeft=thisform.cmdCancel.left
>>nCancelRight=m.nCancelLeft+thisform.cmdCancel.width
>>llReturn = .f.
>>if between(mrow(thisform.name,3),m.nCancelTop,m.nCancelBottom) and ;
>>		between(mcol(thisform.name,3),m.nCancelLeft,m.nCancelRight) and ;
>>		mdown()
>>	llReturn = .t.
>>endif
>>return m.llReturn or lastkey()= 46 && Alt+C (shortcut for Cancel)
>>
>>Is there a way to make this more generic (e.g. find out key combination for Cancel button automatically)?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform