Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing controlsource in editbox to char then memo agai
Message
De
30/12/2007 22:00:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Divers
Thread ID:
01278531
Message ID:
01278558
Vues:
16
>>I'm trying to write a bit of a general tool for some data maintenance, and among other things I have a few methods which do some string cosmetics on various fields. The field currently worked on is a controlsource of a largish editbox. However, there's a combo where, in .interactiveChange(), the controlsource of the editbox can be set to any of the available fields (any memo or c(n) for n>=40). The editbox is refreshed after change.
>>
>>The trouble with this is that setting the controlsource to, say, a c(44) field seems to set maxlength to 44 - the memo loaded next is chopped at this length. This doesn't happen if I've only viewed the shorter field; however, after some typing into it, the editbox seems to get a maximal length equal to 44.
>>
>>Anyone know any tricks that may help here? Setting the controlsource to none and value to "" before assigning the controlsource, maybe? Or would I be better off with separate controls for C(n) and M fields?
>
>Just an idea to try - play with BindControls property of the form. Not sure if it can help with the problem, but it's worth a quick try.

Thought of that, but it's a one-time delayed thing, i.e. works only once. Setting it to .f. will not unbind controls so that they may be re-bound again.

Anyway, drilling down the specs I've found that I need to do different stuff with the c(n) and memo fields, so duplicating the controls actually wouldn't be quite duplicating - the commandbuttons would be different, so this is solved. Just if someone has this problem again, I had it first ;) (or just couldn't find a predecessor)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform