Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / February 2007

Tip: Looking for answers? Try searching our database.

Modifying Control elements by using VB .NET

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Janko - 05 Feb 2007 12:51 GMT
Hi guys,
one short question I have.

I would like to change control elements in Infopath 2007 by using VB .Net
code.

For example:
- I have a DropDown List and now I would like to disable the DropDown Field
by   Code or
- How Can I set the visibility true or false for sections, textboxes, etc.

Has anyone a url with information for me or a Code example how to write code
that it is working.

any help is more then welcome

cheers
Janko
S.Y.M. Wong-A-Ton - 06 Feb 2007 02:46 GMT
You must use conditional formatting on the controls if you want to show/hide
or enable/disable them. The way you would do this is add a helperField to
your data source and then use this field in the conditional formatting rules
you set up for controls. Then in code you can programmatically set the value
of the helperField to kick off the conditional formatting.

Properties of controls cannot be accessed from code, except for their value.
---
S.Y.M. Wong-A-Ton

> Hi guys,
> one short question I have.
[quoted text clipped - 14 lines]
> cheers
> Janko
Janko - 06 Feb 2007 09:14 GMT
Hi,
Thank you very much for your hint :) It helped me alot. Now I can solve my
probs.

But I do find it really strainge that it is not allowed to change the
control properties by code.
I do not understand why this is not possible.
Normally anything can be changed by code, am I right ?

Anyway Thank you very much

cheers Janko

> You must use conditional formatting on the controls if you want to show/hide
> or enable/disable them. The way you would do this is add a helperField to
[quoted text clipped - 24 lines]
> > cheers
> > Janko
S.Y.M. Wong-A-Ton - 06 Feb 2007 09:42 GMT
> Normally anything can be changed by code, am I right ?

Welcome to the wonderful world of InfoPath. :)  This is the very reason why
InfoPath is considered to be such an easy tool, yet so difficult for
programmers to understand and pick up.

InfoPath controls are not your normal controls as in other programming
environments, since InfoPath is all XML. So no, not everything can be changed
by using code.
---
S.Y.M. Wong-A-Ton

> Hi,
> Thank you very much for your hint :) It helped me alot. Now I can solve my
[quoted text clipped - 37 lines]
> > > cheers
> > > Janko
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.