General information
Category:
Forms & Form designer
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only