Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem in grid
Message
 
À
28/01/2007 13:39:22
Reza Meamar
Homa Programming Group
Shiraz, Iran
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01189922
Message ID:
01189923
Vues:
10
>Hi all,
>i have a form with a grid on it. it has only one column.
>My table is : nField N(1,0), CField C(50)
>i want to show my records in this grid with below condition:
>if MyTable.nField = 1 , cField show in right alignment and
>if MyTable.nField = 2 , cField show in left alignment.
>How can i do this?
>Thanks

Because I am not sure if in VFP7 Column object has DynamicAlignment property.


Put another TextBox in the column where cField must be. Edit propertied in both TextBoxes.
In one Set Alignment = 1 - Right
in Other Alignment = 0 - Left

Then put in Init Event of the form:
thisform.ColumnWhereBothTextBoxesAre.DynamicCurrentControl =;
                                     [IIF(MyTable.nField = 1,[TextBoxNameWhithRightAlignment],[TextBoxNameWhithLeftAlignment])]
If there is DynamicAlignment in VFP7 then all is much easier, no additional controls needed, just put in init of the form:
thisform.ColumnWhereBothTextBoxesAre.DynamicAlignment = [IIF(MyTable.nField = 1, 1,0)]
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform