Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Memberdata Script problem
Message
De
21/11/2006 01:33:46
 
 
À
20/11/2006 22:35:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01171318
Message ID:
01171336
Vues:
14
This message has been marked as the solution to the initial question of the thread.
>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].WriteExpression("BackColor1","")

>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform