How to reference control properties using managed code

K

keith brickey

How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
K

keith brickey

That is what I was afraid of... I guess we all need to get good at writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in
message InfoPath does not support accessing control properties -- just values.

Properties for controls are handled in the designer. They are not controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
K

keith brickey

I would like to use a commercially available Treeview control that I have
tested. It is safe for scripting and intitialization and I am able add the
control to an InfoPath form. The control that I want to use was designed for
use with ADO tables. I want to use it unbound in InfoPath and write my own
code to load data into the tree from InfoPath's XML data source. The problem
is, InfoPath does not assign an Id to control instances so there is no way
to reference an instance of the control and its properties. As it looks now,
if I want a Treeview contol that binds to an XML node, I will have to write
it from scratch.

Thanks for asking,

Keith


Matthew Blain (Serriform) said:
What are you trying to accomplish?

--Matthew Blain


keith brickey said:
That is what I was afraid of... I guess we all need to get good at writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in
message InfoPath does not support accessing control properties -- just values.

Properties for controls are handled in the designer. They are not controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
A

Andrew Watt [MVP - InfoPath]

Keith,

I am assuming that this relates to the question that you have asked in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you need to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in the
data source?

Andrew Watt
MVP - InfoPath

I would like to use a commercially available Treeview control that I have
tested. It is safe for scripting and intitialization and I am able add the
control to an InfoPath form. The control that I want to use was designed for
use with ADO tables. I want to use it unbound in InfoPath and write my own
code to load data into the tree from InfoPath's XML data source. The problem
is, InfoPath does not assign an Id to control instances so there is no way
to reference an instance of the control and its properties. As it looks now,
if I want a Treeview contol that binds to an XML node, I will have to write
it from scratch.

Thanks for asking,

Keith


Matthew Blain (Serriform) said:
What are you trying to accomplish?

--Matthew Blain


keith brickey said:
That is what I was afraid of... I guess we all need to get good at writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in
message InfoPath does not support accessing control properties -- just values.

Properties for controls are handled in the designer. They are not controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
K

keith brickey

The general requirement is to develop a modular document solution for a
group of Software Development Life Cycle documents using SQL Server as the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with Business
Process Models for 35 Web Services need a way to map a theoretical
heirarchical data description in the form of an MS Word bulleted list, to
text representing the Enterprise Data Model Xpath statement pointing to the
actual data structure. Our planned implementation requires that this mapping
be saved in a SQL Server database where developers can use InfoPath forms to
query and view/update the mapping for a specific service or service version.
A treeview control is one obvious solution. At this point we even would
settle for a simple way to show indented text in a text box. The following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation of
ActiveX controls in InfoPath, however I do not see why control instances
cannot be given in Id that would allow managed code access all of the
methods and properties exposed by the control designer. Thank you for your
interest in our project and for any suggestions you can make for a possible
solution.

Thanks,

Keith Brickey


Andrew Watt said:
Keith,

I am assuming that this relates to the question that you have asked in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you need to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in the
data source?

Andrew Watt
MVP - InfoPath

I would like to use a commercially available Treeview control that I have
tested. It is safe for scripting and intitialization and I am able add the
control to an InfoPath form. The control that I want to use was designed for
use with ADO tables. I want to use it unbound in InfoPath and write my own
code to load data into the tree from InfoPath's XML data source. The problem
is, InfoPath does not assign an Id to control instances so there is no way
to reference an instance of the control and its properties. As it looks now,
if I want a Treeview contol that binds to an XML node, I will have to write
it from scratch.

Thanks for asking,

Keith


Matthew Blain (Serriform) said:
What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to get good at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote in
message InfoPath does not support accessing control properties -- just values.

Properties for controls are handled in the designer. They are not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
M

Matthew Blain \(Serriform\)

I haven't read your problem in detail, but it at a glance it looks solvable
with XSL, perhaps even with XSL created by the InfoPath designer (sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath, due to
its fundamental architecture, creates and recreates ActiveX controls over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/ (if you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


keith brickey said:
The general requirement is to develop a modular document solution for a
group of Software Development Life Cycle documents using SQL Server as the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with Business
Process Models for 35 Web Services need a way to map a theoretical
heirarchical data description in the form of an MS Word bulleted list, to
text representing the Enterprise Data Model Xpath statement pointing to the
actual data structure. Our planned implementation requires that this mapping
be saved in a SQL Server database where developers can use InfoPath forms to
query and view/update the mapping for a specific service or service version.
A treeview control is one obvious solution. At this point we even would
settle for a simple way to show indented text in a text box. The following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation of
ActiveX controls in InfoPath, however I do not see why control instances
cannot be given in Id that would allow managed code access all of the
methods and properties exposed by the control designer. Thank you for your
interest in our project and for any suggestions you can make for a possible
solution.

Thanks,

Keith Brickey


Andrew Watt said:
Keith,

I am assuming that this relates to the question that you have asked in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you need to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in the
data source?

Andrew Watt
MVP - InfoPath
designed
for
use with ADO tables. I want to use it unbound in InfoPath and write my own
code to load data into the tree from InfoPath's XML data source. The problem
is, InfoPath does not assign an Id to control instances so there is no way
to reference an instance of the control and its properties. As it looks now,
if I want a Treeview contol that binds to an XML node, I will have to write
it from scratch.

Thanks for asking,

Keith


message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to get good at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com>
wrote
in
message InfoPath does not support accessing control properties -- just values.

Properties for controls are handled in the designer. They are not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
K

Keith Brickey

Under what conditions does InfoPath destroy and recreate an ActiveX control?
Is there any way to prevent a control from being destroyed?

Keith

Matthew Blain (Serriform) said:
I haven't read your problem in detail, but it at a glance it looks solvable
with XSL, perhaps even with XSL created by the InfoPath designer (sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath, due to
its fundamental architecture, creates and recreates ActiveX controls over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/ (if you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


keith brickey said:
The general requirement is to develop a modular document solution for a
group of Software Development Life Cycle documents using SQL Server as the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with Business
Process Models for 35 Web Services need a way to map a theoretical
heirarchical data description in the form of an MS Word bulleted list, to
text representing the Enterprise Data Model Xpath statement pointing to the
actual data structure. Our planned implementation requires that this mapping
be saved in a SQL Server database where developers can use InfoPath
forms
to
query and view/update the mapping for a specific service or service version.
A treeview control is one obvious solution. At this point we even would
settle for a simple way to show indented text in a text box. The following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation of
ActiveX controls in InfoPath, however I do not see why control instances
cannot be given in Id that would allow managed code access all of the
methods and properties exposed by the control designer. Thank you for your
interest in our project and for any suggestions you can make for a possible
solution.

Thanks,

Keith Brickey


Andrew Watt said:
Keith,

I am assuming that this relates to the question that you have asked in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you need to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in the
data source?

Andrew Watt
MVP - InfoPath

I would like to use a commercially available Treeview control that I have
tested. It is safe for scripting and intitialization and I am able
add
the
control to an InfoPath form. The control that I want to use was
designed
for
use with ADO tables. I want to use it unbound in InfoPath and write
my
own
code to load data into the tree from InfoPath's XML data source. The problem
is, InfoPath does not assign an Id to control instances so there is
no
way
to reference an instance of the control and its properties. As it
looks
now,
if I want a Treeview contol that binds to an XML node, I will have to write
it from scratch.

Thanks for asking,

Keith


message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to get good at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com>
wrote
in
message InfoPath does not support accessing control properties -- just values.

Properties for controls are handled in the designer. They are not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
B

Brian Teutsch [MSFT]

InfoPath does not make any guarantees about when an ActiveX controls are
recreated. Parts of the view are recreated any time the data changes, and
this includes ActiveX controls. Thus, an ActiveX control may be recreated as
much as any time the user tabs out of the ActiveX.

Brian

Keith Brickey said:
Under what conditions does InfoPath destroy and recreate an ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

Matthew Blain (Serriform) said:
I haven't read your problem in detail, but it at a glance it looks solvable
with XSL, perhaps even with XSL created by the InfoPath designer (sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath, due
to
its fundamental architecture, creates and recreates ActiveX controls over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/ (if you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


keith brickey said:
The general requirement is to develop a modular document solution for a
group of Software Development Life Cycle documents using SQL Server as the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with Business
Process Models for 35 Web Services need a way to map a theoretical
heirarchical data description in the form of an MS Word bulleted list, to
text representing the Enterprise Data Model Xpath statement pointing to the
actual data structure. Our planned implementation requires that this mapping
be saved in a SQL Server database where developers can use InfoPath
forms
to
query and view/update the mapping for a specific service or service version.
A treeview control is one obvious solution. At this point we even would
settle for a simple way to show indented text in a text box. The following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all of the
methods and properties exposed by the control designer. Thank you for your
interest in our project and for any suggestions you can make for a possible
solution.

Thanks,

Keith Brickey


Keith,

I am assuming that this relates to the question that you have asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you need to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview control that I have
tested. It is safe for scripting and intitialization and I am able add
the
control to an InfoPath form. The control that I want to use was designed
for
use with ADO tables. I want to use it unbound in InfoPath and write my
own
code to load data into the tree from InfoPath's XML data source. The
problem
is, InfoPath does not assign an Id to control instances so there is no
way
to reference an instance of the control and its properties. As it looks
now,
if I want a Treeview contol that binds to an XML node, I will have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)" <[email protected]>
wrote in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to get good at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]" <Greg.Collins_AT_InfoPathDev.com> wrote
in
message InfoPath does not support accessing control properties -- just
values.

Properties for controls are handled in the designer. They are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
K

keith brickey

Why is that not a problem with the ActiveX controls used by InfoPath, such
as text box, repeating tables, etc.?

-Keith


Brian Teutsch said:
InfoPath does not make any guarantees about when an ActiveX controls are
recreated. Parts of the view are recreated any time the data changes, and
this includes ActiveX controls. Thus, an ActiveX control may be recreated as
much as any time the user tabs out of the ActiveX.

Brian

Keith Brickey said:
Under what conditions does InfoPath destroy and recreate an ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

Matthew Blain (Serriform) said:
I haven't read your problem in detail, but it at a glance it looks solvable
with XSL, perhaps even with XSL created by the InfoPath designer (sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath, due
to
its fundamental architecture, creates and recreates ActiveX controls over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/ (if you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document solution for a
group of Software Development Life Cycle documents using SQL Server
as
the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with Business
Process Models for 35 Web Services need a way to map a theoretical
heirarchical data description in the form of an MS Word bulleted
list,
to
text representing the Enterprise Data Model Xpath statement pointing to
the
actual data structure. Our planned implementation requires that this
mapping
be saved in a SQL Server database where developers can use InfoPath forms
to
query and view/update the mapping for a specific service or service
version.
A treeview control is one obvious solution. At this point we even would
settle for a simple way to show indented text in a text box. The following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all of the
methods and properties exposed by the control designer. Thank you for your
interest in our project and for any suggestions you can make for a
possible
solution.

Thanks,

Keith Brickey


Keith,

I am assuming that this relates to the question that you have asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you need to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview control that I
have
tested. It is safe for scripting and intitialization and I am able add
the
control to an InfoPath form. The control that I want to use was
designed
for
use with ADO tables. I want to use it unbound in InfoPath and
write
my
own
code to load data into the tree from InfoPath's XML data source. The
problem
is, InfoPath does not assign an Id to control instances so there
is
no
way
to reference an instance of the control and its properties. As it looks
now,
if I want a Treeview contol that binds to an XML node, I will have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)" <[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to get
good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
wrote
in
message InfoPath does not support accessing control properties -- just
values.

Properties for controls are handled in the designer. They are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control instance
properties using managed code such as VB7?

Thanks,

Keith
 
B

Brian Teutsch [MSFT]

It is a problem, but we don't use ActiveX controls. You could say it's one
of the reasons all things in InfoPath are tied to the data. We may
regenerate the entire view when the data changes at any time.

Brian

keith brickey said:
Why is that not a problem with the ActiveX controls used by InfoPath, such
as text box, repeating tables, etc.?

-Keith


Brian Teutsch said:
InfoPath does not make any guarantees about when an ActiveX controls are
recreated. Parts of the view are recreated any time the data changes, and
this includes ActiveX controls. Thus, an ActiveX control may be recreated as
much as any time the user tabs out of the ActiveX.

Brian

Keith Brickey said:
Under what conditions does InfoPath destroy and recreate an ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

in
message I haven't read your problem in detail, but it at a glance it looks
solvable
with XSL, perhaps even with XSL created by the InfoPath designer
(sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath,
due
to
its fundamental architecture, creates and recreates ActiveX controls over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two
resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/ (if you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document solution
for a
group of Software Development Life Cycle documents using SQL Server as
the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with Business
Process Models for 35 Web Services need a way to map a theoretical
heirarchical data description in the form of an MS Word bulleted list,
to
text representing the Enterprise Data Model Xpath statement pointing to
the
actual data structure. Our planned implementation requires that this
mapping
be saved in a SQL Server database where developers can use InfoPath
forms
to
query and view/update the mapping for a specific service or service
version.
A treeview control is one obvious solution. At this point we even would
settle for a simple way to show indented text in a text box. The
following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all of
the
methods and properties exposed by the control designer. Thank you
for
your
interest in our project and for any suggestions you can make for a
possible
solution.

Thanks,

Keith Brickey


Keith,

I am assuming that this relates to the question that you have
asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you need to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview control
that I
have
tested. It is safe for scripting and intitialization and I am
able
add
the
control to an InfoPath form. The control that I want to use was
designed
for
use with ADO tables. I want to use it unbound in InfoPath and write
my
own
code to load data into the tree from InfoPath's XML data source. The
problem
is, InfoPath does not assign an Id to control instances so there is
no
way
to reference an instance of the control and its properties. As it
looks
now,
if I want a Treeview contol that binds to an XML node, I will
have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)" <[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to get good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
wrote
in
message InfoPath does not support accessing control properties --
just
values.

Properties for controls are handled in the designer. They are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control
instance
properties using managed code such as VB7?

Thanks,

Keith
 
K

keith brickey

I'm confused by your response, because I thought that native InfoPath
controls such as text boxes, and repeating tables were ActiveX controls. If
they are, then there must be a reliable, productive way to use ActiveX
controls in InfoPath. If they are not ActiveX controls, what are they? The
real question is, How can we add functionality to InfoPath? I hear a lot
about using XSLT, and I can see how that can be used to display data, but I
don't see how an XSLT transform can be used to enter data? I will appreciate
any enlightenment.

Thanks,

Keith





Brian Teutsch said:
It is a problem, but we don't use ActiveX controls. You could say it's one
of the reasons all things in InfoPath are tied to the data. We may
regenerate the entire view when the data changes at any time.

Brian

keith brickey said:
Why is that not a problem with the ActiveX controls used by InfoPath, such
as text box, repeating tables, etc.?

-Keith


Brian Teutsch said:
InfoPath does not make any guarantees about when an ActiveX controls are
recreated. Parts of the view are recreated any time the data changes, and
this includes ActiveX controls. Thus, an ActiveX control may be
recreated
as
much as any time the user tabs out of the ActiveX.

Brian

Under what conditions does InfoPath destroy and recreate an ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

in
message I haven't read your problem in detail, but it at a glance it looks
solvable
with XSL, perhaps even with XSL created by the InfoPath designer
(sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath,
due
to
its fundamental architecture, creates and recreates ActiveX controls over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two
resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/
(if
you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document solution
for a
group of Software Development Life Cycle documents using SQL
Server
as
the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with Business
Process Models for 35 Web Services need a way to map a theoretical
heirarchical data description in the form of an MS Word bulleted list,
to
text representing the Enterprise Data Model Xpath statement
pointing
to
the
actual data structure. Our planned implementation requires that this
mapping
be saved in a SQL Server database where developers can use InfoPath
forms
to
query and view/update the mapping for a specific service or service
version.
A treeview control is one obvious solution. At this point we even would
settle for a simple way to show indented text in a text box. The
following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's
implementation
of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all of
the
methods and properties exposed by the control designer. Thank you
for
your
interest in our project and for any suggestions you can make for a
possible
solution.

Thanks,

Keith Brickey


Keith,

I am assuming that this relates to the question that you have
asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What does
the user want/need to do?

I guess the other key pieces of information are what data you
need
to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is
in
the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview control
that I
have
tested. It is safe for scripting and intitialization and I am
able
add
the
control to an InfoPath form. The control that I want to use was
designed
for
use with ADO tables. I want to use it unbound in InfoPath and write
my
own
code to load data into the tree from InfoPath's XML data
source.
The
problem
is, InfoPath does not assign an Id to control instances so
there
is
no
way
to reference an instance of the control and its properties. As it
looks
now,
if I want a Treeview contol that binds to an XML node, I will
have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)" <[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to get good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
wrote
in
message InfoPath does not support accessing control properties --
just
values.

Properties for controls are handled in the designer. They are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control
instance
properties using managed code such as VB7?

Thanks,

Keith
 
B

Brian Teutsch [MSFT]

ActiveX controls are a great way to add functionality to InfoPath,
regardless of how InfoPath implements its controls (which are not ActiveX
based).

Your new question is somewhat vague. I understand that you wanted to use
custom properties on the ActiveX, and those wouldn't work because the
ActiveX gets created repeatedly. But there's been lots of examples on the
newsgroup and blogs about custom XSLT and ActiveX usage.

Brian

keith brickey said:
I'm confused by your response, because I thought that native InfoPath
controls such as text boxes, and repeating tables were ActiveX controls.
If
they are, then there must be a reliable, productive way to use ActiveX
controls in InfoPath. If they are not ActiveX controls, what are they? The
real question is, How can we add functionality to InfoPath? I hear a lot
about using XSLT, and I can see how that can be used to display data, but
I
don't see how an XSLT transform can be used to enter data? I will
appreciate
any enlightenment.

Thanks,

Keith





Brian Teutsch said:
It is a problem, but we don't use ActiveX controls. You could say it's
one
of the reasons all things in InfoPath are tied to the data. We may
regenerate the entire view when the data changes at any time.

Brian

keith brickey said:
Why is that not a problem with the ActiveX controls used by InfoPath, such
as text box, repeating tables, etc.?

-Keith


InfoPath does not make any guarantees about when an ActiveX controls are
recreated. Parts of the view are recreated any time the data changes, and
this includes ActiveX controls. Thus, an ActiveX control may be recreated
as
much as any time the user tabs out of the ActiveX.

Brian

Under what conditions does InfoPath destroy and recreate an ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

"Matthew Blain (Serriform)" <[email protected]>
wrote
in
message I haven't read your problem in detail, but it at a glance it looks
solvable
with XSL, perhaps even with XSL created by the InfoPath designer
(sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath,
due
to
its fundamental architecture, creates and recreates ActiveX
controls
over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two
resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/ (if
you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document solution
for
a
group of Software Development Life Cycle documents using SQL Server
as
the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with
Business
Process Models for 35 Web Services need a way to map a
theoretical
heirarchical data description in the form of an MS Word bulleted
list,
to
text representing the Enterprise Data Model Xpath statement pointing
to
the
actual data structure. Our planned implementation requires that this
mapping
be saved in a SQL Server database where developers can use InfoPath
forms
to
query and view/update the mapping for a specific service or service
version.
A treeview control is one obvious solution. At this point we even
would
settle for a simple way to show indented text in a text box. The
following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation
of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all of
the
methods and properties exposed by the control designer. Thank you
for
your
interest in our project and for any suggestions you can make for
a
possible
solution.

Thanks,

Keith Brickey


message
Keith,

I am assuming that this relates to the question that you have
asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What
does
the user want/need to do?

I guess the other key pieces of information are what data you need
to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in
the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview control
that
I
have
tested. It is safe for scripting and intitialization and I am
able
add
the
control to an InfoPath form. The control that I want to use
was
designed
for
use with ADO tables. I want to use it unbound in InfoPath and
write
my
own
code to load data into the tree from InfoPath's XML data source.
The
problem
is, InfoPath does not assign an Id to control instances so there
is
no
way
to reference an instance of the control and its properties. As it
looks
now,
if I want a Treeview contol that binds to an XML node, I will
have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)"
<[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to
get
good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
<Greg.Collins_AT_InfoPathDev.com>
wrote
in
message InfoPath does not support accessing control properties --
just
values.

Properties for controls are handled in the designer. They are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control
instance
properties using managed code such as VB7?

Thanks,

Keith
 
C

Caduseuscoil

Hello,

I've been reading this thread and I'm also having the same issues in
InfoPath. Are there any samples, documents ect that show writing controls for
InfoPath that aren't ActiveX based?

Thanks,
Cliff


Brian Teutsch said:
ActiveX controls are a great way to add functionality to InfoPath,
regardless of how InfoPath implements its controls (which are not ActiveX
based).

Your new question is somewhat vague. I understand that you wanted to use
custom properties on the ActiveX, and those wouldn't work because the
ActiveX gets created repeatedly. But there's been lots of examples on the
newsgroup and blogs about custom XSLT and ActiveX usage.

Brian

keith brickey said:
I'm confused by your response, because I thought that native InfoPath
controls such as text boxes, and repeating tables were ActiveX controls.
If
they are, then there must be a reliable, productive way to use ActiveX
controls in InfoPath. If they are not ActiveX controls, what are they? The
real question is, How can we add functionality to InfoPath? I hear a lot
about using XSLT, and I can see how that can be used to display data, but
I
don't see how an XSLT transform can be used to enter data? I will
appreciate
any enlightenment.

Thanks,

Keith





Brian Teutsch said:
It is a problem, but we don't use ActiveX controls. You could say it's
one
of the reasons all things in InfoPath are tied to the data. We may
regenerate the entire view when the data changes at any time.

Brian

Why is that not a problem with the ActiveX controls used by InfoPath, such
as text box, repeating tables, etc.?

-Keith


InfoPath does not make any guarantees about when an ActiveX controls are
recreated. Parts of the view are recreated any time the data changes, and
this includes ActiveX controls. Thus, an ActiveX control may be recreated
as
much as any time the user tabs out of the ActiveX.

Brian

Under what conditions does InfoPath destroy and recreate an ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

"Matthew Blain (Serriform)" <[email protected]>
wrote
in
message I haven't read your problem in detail, but it at a glance it looks
solvable
with XSL, perhaps even with XSL created by the InfoPath designer
(sections,
repeating sections, etc). The hard part is promotion/other structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that InfoPath,
due
to
its fundamental architecture, creates and recreates ActiveX
controls
over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two
resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/ (if
you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document solution
for
a
group of Software Development Life Cycle documents using SQL Server
as
the
data store and InfoPath/WSS as the publication method. The immediate
challenge appears simple enough. System analysts working with
Business
Process Models for 35 Web Services need a way to map a
theoretical
heirarchical data description in the form of an MS Word bulleted
list,
to
text representing the Enterprise Data Model Xpath statement pointing
to
the
actual data structure. Our planned implementation requires that this
mapping
be saved in a SQL Server database where developers can use InfoPath
forms
to
query and view/update the mapping for a specific service or service
version.
A treeview control is one obvious solution. At this point we even
would
settle for a simple way to show indented text in a text box. The
following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type ="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type = "svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's implementation
of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all of
the
methods and properties exposed by the control designer. Thank you
for
your
interest in our project and for any suggestions you can make for
a
possible
solution.

Thanks,

Keith Brickey


message
Keith,

I am assuming that this relates to the question that you have
asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are? What
does
the user want/need to do?

I guess the other key pieces of information are what data you need
to
load into the tree control at form load, what the user needs to be
able to do with the tree control and what the XML structure is in
the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview control
that
I
have
tested. It is safe for scripting and intitialization and I am
able
add
the
control to an InfoPath form. The control that I want to use
was
designed
for
use with ADO tables. I want to use it unbound in InfoPath and
write
my
own
code to load data into the tree from InfoPath's XML data source.
The
problem
is, InfoPath does not assign an Id to control instances so there
is
no
way
to reference an instance of the control and its properties. As it
looks
now,
if I want a Treeview contol that binds to an XML node, I will
have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)"
<[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to
get
good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
<Greg.Collins_AT_InfoPathDev.com>
wrote
in
message InfoPath does not support accessing control properties --
just
values.

Properties for controls are handled in the designer. They are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound control
instance
properties using managed code such as VB7?

Thanks,

Keith
 
B

Brian Teutsch [MSFT]

ActiveX controls are the only type of custom controls that InfoPath
supports. It is not possible to write a .NET control or WinForm for use
directly in an InfoPath form. You may be able to use your control in a
custom task pane, if that's an option.

Brian

Caduseuscoil said:
Hello,

I've been reading this thread and I'm also having the same issues in
InfoPath. Are there any samples, documents ect that show writing controls
for
InfoPath that aren't ActiveX based?

Thanks,
Cliff


Brian Teutsch said:
ActiveX controls are a great way to add functionality to InfoPath,
regardless of how InfoPath implements its controls (which are not ActiveX
based).

Your new question is somewhat vague. I understand that you wanted to use
custom properties on the ActiveX, and those wouldn't work because the
ActiveX gets created repeatedly. But there's been lots of examples on the
newsgroup and blogs about custom XSLT and ActiveX usage.

Brian

keith brickey said:
I'm confused by your response, because I thought that native InfoPath
controls such as text boxes, and repeating tables were ActiveX
controls.
If
they are, then there must be a reliable, productive way to use ActiveX
controls in InfoPath. If they are not ActiveX controls, what are they?
The
real question is, How can we add functionality to InfoPath? I hear a
lot
about using XSLT, and I can see how that can be used to display data,
but
I
don't see how an XSLT transform can be used to enter data? I will
appreciate
any enlightenment.

Thanks,

Keith





It is a problem, but we don't use ActiveX controls. You could say it's
one
of the reasons all things in InfoPath are tied to the data. We may
regenerate the entire view when the data changes at any time.

Brian

Why is that not a problem with the ActiveX controls used by
InfoPath,
such
as text box, repeating tables, etc.?

-Keith


message
InfoPath does not make any guarantees about when an ActiveX
controls
are
recreated. Parts of the view are recreated any time the data
changes,
and
this includes ActiveX controls. Thus, an ActiveX control may be
recreated
as
much as any time the user tabs out of the ActiveX.

Brian

Under what conditions does InfoPath destroy and recreate an
ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

"Matthew Blain (Serriform)" <[email protected]>
wrote
in
message I haven't read your problem in detail, but it at a glance it
looks
solvable
with XSL, perhaps even with XSL created by the InfoPath designer
(sections,
repeating sections, etc). The hard part is promotion/other
structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that
InfoPath,
due
to
its fundamental architecture, creates and recreates ActiveX
controls
over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two
resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/
(if
you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document
solution
for
a
group of Software Development Life Cycle documents using SQL
Server
as
the
data store and InfoPath/WSS as the publication method. The
immediate
challenge appears simple enough. System analysts working with
Business
Process Models for 35 Web Services need a way to map a
theoretical
heirarchical data description in the form of an MS Word
bulleted
list,
to
text representing the Enterprise Data Model Xpath statement
pointing
to
the
actual data structure. Our planned implementation requires
that
this
mapping
be saved in a SQL Server database where developers can use
InfoPath
forms
to
query and view/update the mapping for a specific service or
service
version.
A treeview control is one obvious solution. At this point we
even
would
settle for a simple way to show indented text in a text box.
The
following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type
="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type =
"svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's
implementation
of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all
of
the
methods and properties exposed by the control designer. Thank
you
for
your
interest in our project and for any suggestions you can make
for
a
possible
solution.

Thanks,

Keith Brickey


message
Keith,

I am assuming that this relates to the question that you
have
asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are?
What
does
the user want/need to do?

I guess the other key pieces of information are what data
you
need
to
load into the tree control at form load, what the user needs
to
be
able to do with the tree control and what the XML structure
is
in
the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview
control
that
I
have
tested. It is safe for scripting and intitialization and I
am
able
add
the
control to an InfoPath form. The control that I want to use
was
designed
for
use with ADO tables. I want to use it unbound in InfoPath
and
write
my
own
code to load data into the tree from InfoPath's XML data
source.
The
problem
is, InfoPath does not assign an Id to control instances so
there
is
no
way
to reference an instance of the control and its properties.
As
it
looks
now,
if I want a Treeview contol that binds to an XML node, I
will
have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)"
<[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to
get
good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
<Greg.Collins_AT_InfoPathDev.com>
wrote
in
message InfoPath does not support accessing control
properties --
just
values.

Properties for controls are handled in the designer.
They
are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound
control
instance
properties using managed code such as VB7?

Thanks,

Keith
 
C

Caduceus Coil

Thanks Brian,

Unfortunately the control must be in the form. I'm using it to authenticate
users in an Active directory and then display their grahical signature. The
problem I'm having along with everyone else is:

A. InfoPath won't save bound data from the control to the XML (I've read
everything there is to read about it so far such as firing the
PropertyChanged, using only STDOLE data types and I still can't get it to
work.)
B. InfoPath gets confused about the image to print. It tries to print a
representation of the control as it was inserted (a logo and a button), not
what it looks like after the signature picture is made the background image
of the control and the logo and button are hidden.

Wereas Word,Excel,Visio ect will do these tasks just fine.

C.

Brian Teutsch said:
ActiveX controls are the only type of custom controls that InfoPath
supports. It is not possible to write a .NET control or WinForm for use
directly in an InfoPath form. You may be able to use your control in a
custom task pane, if that's an option.

Brian

Caduseuscoil said:
Hello,

I've been reading this thread and I'm also having the same issues in
InfoPath. Are there any samples, documents ect that show writing controls
for
InfoPath that aren't ActiveX based?

Thanks,
Cliff


Brian Teutsch said:
ActiveX controls are a great way to add functionality to InfoPath,
regardless of how InfoPath implements its controls (which are not ActiveX
based).

Your new question is somewhat vague. I understand that you wanted to use
custom properties on the ActiveX, and those wouldn't work because the
ActiveX gets created repeatedly. But there's been lots of examples on the
newsgroup and blogs about custom XSLT and ActiveX usage.

Brian

I'm confused by your response, because I thought that native InfoPath
controls such as text boxes, and repeating tables were ActiveX
controls.
If
they are, then there must be a reliable, productive way to use ActiveX
controls in InfoPath. If they are not ActiveX controls, what are they?
The
real question is, How can we add functionality to InfoPath? I hear a
lot
about using XSLT, and I can see how that can be used to display data,
but
I
don't see how an XSLT transform can be used to enter data? I will
appreciate
any enlightenment.

Thanks,

Keith





It is a problem, but we don't use ActiveX controls. You could say it's
one
of the reasons all things in InfoPath are tied to the data. We may
regenerate the entire view when the data changes at any time.

Brian

Why is that not a problem with the ActiveX controls used by
InfoPath,
such
as text box, repeating tables, etc.?

-Keith


message
InfoPath does not make any guarantees about when an ActiveX
controls
are
recreated. Parts of the view are recreated any time the data
changes,
and
this includes ActiveX controls. Thus, an ActiveX control may be
recreated
as
much as any time the user tabs out of the ActiveX.

Brian

Under what conditions does InfoPath destroy and recreate an
ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

"Matthew Blain (Serriform)" <[email protected]>
wrote
in
message I haven't read your problem in detail, but it at a glance it
looks
solvable
with XSL, perhaps even with XSL created by the InfoPath designer
(sections,
repeating sections, etc). The hard part is promotion/other
structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that
InfoPath,
due
to
its fundamental architecture, creates and recreates ActiveX
controls
over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following two
resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of http://www.developingsolutionswithinfopath.com/
(if
you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document
solution
for
a
group of Software Development Life Cycle documents using SQL
Server
as
the
data store and InfoPath/WSS as the publication method. The
immediate
challenge appears simple enough. System analysts working with
Business
Process Models for 35 Web Services need a way to map a
theoretical
heirarchical data description in the form of an MS Word
bulleted
list,
to
text representing the Enterprise Data Model Xpath statement
pointing
to
the
actual data structure. Our planned implementation requires
that
this
mapping
be saved in a SQL Server database where developers can use
InfoPath
forms
to
query and view/update the mapping for a specific service or
service
version.
A treeview control is one obvious solution. At this point we
even
would
settle for a simple way to show indented text in a text box.
The
following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type
="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/ subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type =
"svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's
implementation
of
ActiveX controls in InfoPath, however I do not see why control
instances
cannot be given in Id that would allow managed code access all
of
the
methods and properties exposed by the control designer. Thank
you
for
your
interest in our project and for any suggestions you can make
for
a
possible
solution.

Thanks,

Keith Brickey


message
Keith,

I am assuming that this relates to the question that you
have
asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements are?
What
does
the user want/need to do?

I guess the other key pieces of information are what data
you
need
to
load into the tree control at form load, what the user needs
to
be
able to do with the tree control and what the XML structure
is
in
the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview
control
that
I
have
tested. It is safe for scripting and intitialization and I
am
able
add
the
control to an InfoPath form. The control that I want to use
was
designed
for
use with ADO tables. I want to use it unbound in InfoPath
and
write
my
own
code to load data into the tree from InfoPath's XML data
source.
The
problem
is, InfoPath does not assign an Id to control instances so
there
is
no
way
to reference an instance of the control and its properties.
As
it
looks
now,
if I want a Treeview contol that binds to an XML node, I
will
have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)"
<[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need to
get
good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
<Greg.Collins_AT_InfoPathDev.com>
wrote
in
message InfoPath does not support accessing control
properties --
just
values.

Properties for controls are handled in the designer.
They
are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound
control
instance
properties using managed code such as VB7?

Thanks,

Keith
 
B

Brian Teutsch [MSFT]

It sounds like the main problem is that your control isn't binding properly.
That is leading to the downstream issue that the control is printing its
default appearance. Sorry that I'm not more knowledgable about creating
ActiveX controls within InfoPath to help you out.

Brian

Caduceus Coil said:
Thanks Brian,

Unfortunately the control must be in the form. I'm using it to
authenticate
users in an Active directory and then display their grahical signature.
The
problem I'm having along with everyone else is:

A. InfoPath won't save bound data from the control to the XML (I've read
everything there is to read about it so far such as firing the
PropertyChanged, using only STDOLE data types and I still can't get it to
work.)
B. InfoPath gets confused about the image to print. It tries to print a
representation of the control as it was inserted (a logo and a button),
not
what it looks like after the signature picture is made the background
image
of the control and the logo and button are hidden.

Wereas Word,Excel,Visio ect will do these tasks just fine.

C.

Brian Teutsch said:
ActiveX controls are the only type of custom controls that InfoPath
supports. It is not possible to write a .NET control or WinForm for use
directly in an InfoPath form. You may be able to use your control in a
custom task pane, if that's an option.

Brian

Caduseuscoil said:
Hello,

I've been reading this thread and I'm also having the same issues in
InfoPath. Are there any samples, documents ect that show writing
controls
for
InfoPath that aren't ActiveX based?

Thanks,
Cliff


:

ActiveX controls are a great way to add functionality to InfoPath,
regardless of how InfoPath implements its controls (which are not
ActiveX
based).

Your new question is somewhat vague. I understand that you wanted to
use
custom properties on the ActiveX, and those wouldn't work because the
ActiveX gets created repeatedly. But there's been lots of examples on
the
newsgroup and blogs about custom XSLT and ActiveX usage.

Brian

I'm confused by your response, because I thought that native
InfoPath
controls such as text boxes, and repeating tables were ActiveX
controls.
If
they are, then there must be a reliable, productive way to use
ActiveX
controls in InfoPath. If they are not ActiveX controls, what are
they?
The
real question is, How can we add functionality to InfoPath? I hear a
lot
about using XSLT, and I can see how that can be used to display
data,
but
I
don't see how an XSLT transform can be used to enter data? I will
appreciate
any enlightenment.

Thanks,

Keith





message
It is a problem, but we don't use ActiveX controls. You could say
it's
one
of the reasons all things in InfoPath are tied to the data. We may
regenerate the entire view when the data changes at any time.

Brian

Why is that not a problem with the ActiveX controls used by
InfoPath,
such
as text box, repeating tables, etc.?

-Keith


message
InfoPath does not make any guarantees about when an ActiveX
controls
are
recreated. Parts of the view are recreated any time the data
changes,
and
this includes ActiveX controls. Thus, an ActiveX control may be
recreated
as
much as any time the user tabs out of the ActiveX.

Brian

Under what conditions does InfoPath destroy and recreate an
ActiveX
control?
Is there any way to prevent a control from being destroyed?

Keith

"Matthew Blain (Serriform)"
<[email protected]>
wrote
in
message I haven't read your problem in detail, but it at a glance it
looks
solvable
with XSL, perhaps even with XSL created by the InfoPath
designer
(sections,
repeating sections, etc). The hard part is promotion/other
structural
manipulation, though you can do it with custom code.

The biggest issue if you go down the ActiveX path is that
InfoPath,
due
to
its fundamental architecture, creates and recreates ActiveX
controls
over
and over again, and your wrapper will need to handle that.

For more info on ActiveX controls, I reccomend the following
two
resources:
1) Articles from Andrew Ma on his or the InfoPath team blog.
(http://blogs.msdn.com/ajma/)
2) Chapter 5 of
http://www.developingsolutionswithinfopath.com/
(if
you
have any questions on that, you can contact me directly.)

--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/


The general requirement is to develop a modular document
solution
for
a
group of Software Development Life Cycle documents using
SQL
Server
as
the
data store and InfoPath/WSS as the publication method. The
immediate
challenge appears simple enough. System analysts working
with
Business
Process Models for 35 Web Services need a way to map a
theoretical
heirarchical data description in the form of an MS Word
bulleted
list,
to
text representing the Enterprise Data Model Xpath statement
pointing
to
the
actual data structure. Our planned implementation requires
that
this
mapping
be saved in a SQL Server database where developers can use
InfoPath
forms
to
query and view/update the mapping for a specific service or
service
version.
A treeview control is one obvious solution. At this point
we
even
would
settle for a simple way to show indented text in a text
box.
The
following
table illustrates what we need to accomplish:

BPM Description of Data
Enterprise Data Model Xpath

· Subscriber Profile
/request/subscriber/profile Type = "custProfile"

o Account Number
/request/subscriber/profile/customer/account

o Customer Name
/requst/ subscriber/profile/customer/name
Type="custName"

§ First
/request/ subscriber/profile/customer/name/First

§ Middle
/request/ subscriber/profile/customer/name/last

§ Last
/request/ subscriber/profile/customer/name/last

o Credit Card Information
/request/ subscriber/profile/creditCardInfo Type
="ccInfo"

§ Type
/request/ subscriber/profile/creditCardInfo/type

§ Account Number
/request/
subscriber/profile/creditCardInfo/accountNumber

o Service Address
/request/subscriber/profile/serviceAddress Type =
"svcAddr"

§ Line 1
/request/subscriber/profile/serviceAddress/line1

§ Line 2
/request/subscriber/profile/serviceAddress/line2

§ City
/request/subscriber/profile/serviceAddress/city

§ State
/request/subscriber/profile/serviceAddress/state

§ Zip
/request/subscriber/profile/serviceAddress/zip




I suppose there is good reasoning behind Microsoft's
implementation
of
ActiveX controls in InfoPath, however I do not see why
control
instances
cannot be given in Id that would allow managed code access
all
of
the
methods and properties exposed by the control designer.
Thank
you
for
your
interest in our project and for any suggestions you can
make
for
a
possible
solution.

Thanks,

Keith Brickey


in
message
Keith,

I am assuming that this relates to the question that you
have
asked
in
various ways in past threads.

Can you describe, pretty fully, what the requirements
are?
What
does
the user want/need to do?

I guess the other key pieces of information are what data
you
need
to
load into the tree control at form load, what the user
needs
to
be
able to do with the tree control and what the XML
structure
is
in
the
data source?

Andrew Watt
MVP - InfoPath

On Sat, 11 Dec 2004 22:45:47 -0800, "keith brickey"
<[email protected]>
wrote:

I would like to use a commercially available Treeview
control
that
I
have
tested. It is safe for scripting and intitialization and
I
am
able
add
the
control to an InfoPath form. The control that I want to
use
was
designed
for
use with ADO tables. I want to use it unbound in
InfoPath
and
write
my
own
code to load data into the tree from InfoPath's XML data
source.
The
problem
is, InfoPath does not assign an Id to control instances
so
there
is
no
way
to reference an instance of the control and its
properties.
As
it
looks
now,
if I want a Treeview contol that binds to an XML node, I
will
have
to
write
it from scratch.

Thanks for asking,

Keith


"Matthew Blain (Serriform)"
<[email protected]>
wrote
in
message What are you trying to accomplish?

--Matthew Blain


That is what I was afraid of... I guess we all need
to
get
good
at
writing
contols, since they will all need to be custom.


"Greg Collins [InfoPath MVP]"
<Greg.Collins_AT_InfoPathDev.com>
wrote
in
message
InfoPath does not support accessing control
properties --
just
values.

Properties for controls are handled in the designer.
They
are
not
controlled
at runtime.

--
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com



How can an infopath form program reference unbound
control
instance
properties using managed code such as VB7?

Thanks,

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top