Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memberdata Script problem
Message
From
20/11/2006 22:35:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Memberdata Script problem
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01171318
Message ID:
01171318
Views:
58
Hello,

Based in a sample that I took from the great book "What's new in 9", I've added a script to a property that I added to one of my classes.

My goal is to open the ColorPicker when the developer clic on the ellipsis or doubleclick the property, and change the property value according to the selected color.

I'm using the script below:
LOCAL aControl[1], nColor
IF ASELOBJ(aControl) = 0 
   IF ASELOBJ(aControl, 1) = 0 
      RETURN 
   ENDIF 
ENDIF 
  
* Grab default value 
IF VARTYPE(aControl[1].BackColor1) = "N"
   nColor = aControl[1].BackColor1
ELSE 
   nColor = 0 
ENDIF 
  
nColor = GETCOLOR(nColor) 
aControl[1].BackColor1 =  nColor

RETURN
It works perfectly, except if the property value contained any kind of expression as an original value. In that case, the colorpicker is opened, but the selected color is not updated to the property.

Can someone give me some enlightening ?

TIA

Cesar
Next
Reply
Map
View

Click here to load this message in the networking platform