Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optiongroup problem
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00399631
Message ID:
00399827
Vues:
14
>>I am trying to use an option group with two buttons, Yes and No, to represent the state of a logical field.
>>
>>the interactivechange,
>>
>>IF THIS.Value = 'Yes'
>> REPLACE ACTCOMPL.nontrad WITH .T.
>>ELSE
>> REPLACE ACTCOMPL.nontrad WITH .F.
>>ENDIF
>>
>>seems to work and display correctly,
>>but in the init I have:
>>
>>IF ACTCOMPL.nontrad
>> THIS.Value = 'Yes'
>>ELSE
>> THIS.Value = 'No'
>>ENDIF
>>
>>to display the current value when the form opens, but it always displays 'No' regardless of the field value
>>
>>Any suggestions?
>>TIA
>>
>>Al

Al,

At the second thought, put this code to Init of the form, not the Init of the Option Group, e.g.
Form.Init
  ** Your other code
  select yourAlias
  with this.optGroup
   IF ACTCOMPL.nontrad
      .Option1.Value = 1
    ELSE
     .Option2.Value = 1
    ENDIF
  
  endwith
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform