ActiveX properties

Post Reply
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

ActiveX properties

Post by Roberto Parisi »

...
oObj := TActiveX():New(oWnd, "MyControl")
oPanels := oObj:GetProp("Panels")
oPanels:Do("Add", "Item 1")
oPanels:Do("Add", "Item 2")
...

Can I access to activex properties like this?

Regards
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roberto,

oPanels is not an ActiveX, so you have to do it this way:

Code: Select all

oObj := TActiveX():New(oWnd, "MyControl") 
oPanels := oObj:GetProp( "Panels" ) 
OleInvoke( oPanels, "Add", "Item 1" ) 
OleInvoke( oPanels, "Add", "Item 2" ) 
regards, saludos

Antonio Linares
www.fivetechsoft.com
Roberto Parisi
Posts: 116
Joined: Thu Oct 13, 2005 5:14 pm
Location: Italy

Post by Roberto Parisi »

Thx Antonio, now it works.

What about a more simple access to propertyies and methods like xHarbour Activex?

oObj := TActiveX():New(oWnd, "MyControl")
oObj:Panels:Add("Item1")
oObj:Panels:Add("Item2")
...

Regards,
Roberto Parisi
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roberto,

Yes, we may implement it.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply