Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Button caption gotcha
Message
From
06/11/1996 00:47:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Button caption gotcha
Miscellaneous
Thread ID:
00011561
Message ID:
00011561
Views:
69
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
Map
View

Click here to load this message in the networking platform