Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Button caption gotcha
Here's a snippet where I found some unexpected results:
The original caption property of cmdAddEdge is
"Add Edging"
What I was attempting was to use a btn for two functions and determine the action to take depending upon the Caption, I choose to IF on the Caption cause I was changing it anyway to inform the user that it's function changed.
The interesting thing is that *IF THIS.Caption = "Add"*
is evaulating to .T.,
even when the Caption is "Add Edging".
If this isn't a bug, then it's highly unexpected behaviour.
FWIW, Kim
*** cmdAddEdge.Click
*** Created: 11/05/96
*** Purpose:
set step on
IF THIS.Caption = "Add"
SELECT('gls_edge')
APPEND BLANK
REPLACE glsparms_id WITH glsparms.id, ;
edge with THISFORM.cboEdgeWork.Value, ;
additional with THISFORM.cboEdgeThickness.Value
THIS.Caption = "Add Edging"
ELSE
THISFORM.cboEdgework.SetFocus()
THIS.Caption = "Add"
ENDIF
THIS.refresh
RETURN
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