[python-win32] Re : activeX persistent properties

victor LEBRUN victor_lebrun at yahoo.fr
Tue Sep 11 12:42:18 CEST 2007


A persistent property is only accessible at design-time and not at run-time, and it drives the behavior of the activeX control.
Those properties are public I think since you can modify them.
But if you call the object with win32com.client.Dispatch it is tool late since the property can not be set at run-time....
I need to tell to the object when I create it that one of its property is 'Picture' (the property is ModuleName), if it is already there it is too late I change the property but  nothing appends:


 tl=win32com.client.Dispatch('blabla') 

tl.ModuleName= 'Picture' <=nothing appends, I need to pass this property during  tl=win32com.client.Dispatch('blabla')

-------------------------------------------------
in french
-------------------------------------------------


Pour moi une 'persistent property' est une propriete qui n'est modifiable que lors du design de l'application avec Visual Studio ou autre, elle conditionne le controle, par example si le control va afficher un bitmap ou si il va afficher une image 'active' etc...

ma proprietee est 'ModuleName', si j' appelle l'objet avec tl=win32com.client.Dispatch('blabla') j'ai beau essayer tl.ModuleName= 'Picture'  ca ne change pas le comportement.... il faut donc que le control activeX sache avant le run-time que je veux qu'il aille me chercher la fonctionnalite 'Picture', j'ai vu qu'il y a un win32ui.CreateControl qui est appele je me demande si je ne peux pas passer des arguments a cette methode.... ou autre chose



Any ideas ?



regards,


Victor







----- Message d'origine ----
De : Michel Claveau <mc at mclaveau.com>
À : python-win32 at python.org
Envoyé le : Mardi, 11 Septembre 2007, 12h24mn 15s
Objet : Re: [python-win32] activeX persistent properties

Bonjour !


> I would lik to know if it is possible to access persistent properties of 
> an ole object (activeX control) with pywin ?

Par défaut, j'aurais tendance à répondre OUI, du moment qu'elles sont 
exposées (publiques). Car Python+Pywin32 permet d'accéder aux propriétés 
d'un objet COM.  Attention à un point : à partir d'un objet OLE, il est des 
fois difficile de retrouver l'objet COM correspondant (sous-jacent).

Mais, qu'appelez-vous propriétés "persistance", et, surtout, en quoi les 
distinguez-vous des propriétés normales.


@-salutations

Michel Claveau

_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32





      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 


More information about the python-win32 mailing list