Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Special inputmask
Message
De
21/01/2002 07:15:50
 
 
À
20/01/2002 13:39:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00607477
Message ID:
00607644
Vues:
22
Hi Roman

I don't think you can do this with a grid. As soon as you change the controlsource for a column to anything but a simple binding to a field or variable, VFP makes the column read-only.

While you may be able to handle the incrementing leading spaces you will not be able to keep the field editable.

I think you need to look at an ActiveX control for this sort of thing - either the FlexGrid or (if you can manage without the editing) either the TreeView or the ListView. You will find all of them available in the ActiveX controls that ship with VFP.

----
Regards

Andy Kramek
MVP (Visual FoxPro)

>Hi
>
>Here is my case. I got a grid with two columns, the controlsource of
>the first column is established with a character field (size 124), on the
>second one the controlsource correspond to a numeric field. what i want
>to do is to 'notch' the values of the first column according to the
>values of the second one and at the same time being able to modify the
>value of the first field, for example:
>
> firstCol1 secondCol
> X0001 2
> X0002 0
> X0003 3
> x0004 7
>
>I have acchieved that by establishing the next code in the dynamicinputmask
>propertie of the column1:
>
>column1.dynamicinputmask=space(table.secondfield)+table.firstfield
>
>But my problem is that i can't modify the value of the first column.
>In order to achieve the above I've tried to execute the next code
>when the textbox get the focus (it doesn't matter that when i try to modify
>the value of the field, the inputask of the textbox be none):
>
>*this.parent.dynamicinputmask=[]
>this.format=[]
>this.inputmask=[]
>
>and this when it loses:
>
>this.parent.dynamicinputmask=space(table.secondfield)+table.firstfield
>
>But no good result so far. I've tried to put the above code in several
>events of the textbox (click, programmaticchange, mousedown, etc)
>but I haven't been able to get what i want (probably, I haven't made the right
>combination).
>
>In case we solve this problem (which i hope), how I can reduce the size of the firstfield and at the same time increase the number of posible 'notches' on it. So far, the max number of 'notches' that I got is 124, but i'd like to get a higher number and reduce the size of the first field as well.
>
>thanks in advance
----
Regards
Andy Kramek
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform