Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2000 Server
Hi,
>>Firstly I just noticed this is VFP9. I was using VFP8SP1. There, it seems, returning .F. from the .Text1.Init() *always* causes the form to fail to instantiate.
Sorry, retraction - I don't see this on simple VFP8 form.
>>So, switching to VFP9, I see most of what you say - essentially a .Text1 control is created anytime there is not .CurrentControl on the column (and the behaviour when .Sparse=.T. is just an extension of this). I don't think there's any real difference whether .Text1 is removed in it's own Init() or later (just that it's still visible in the debugger in it's own Init). But the combination of .Remove("text1") and 'Return .F.' in it's init() will still stop the form instantiating...
>I was doing this in column's init()... before it got visible. That could be another difference which may or may not matter. So we're at least clear that there's more to this than we've found so far.
Bottom line seems to be that you can remove Text1 at any point, including it's own Init(), and a default Text1 will be automatically recreated when required. Only exception is the case mentioned above (remove in own Init() and return .F. from there) and since I can't think of a real life scenario where I'd want to do that I guess I won't worry about it.... :-)
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement