Widening drop-down list at runtime - InfoPath Dev
in

InfoPath Dev

Widening drop-down list at runtime

Last post 09-26-2006 05:26 AM by LaurieAPMarsh. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 09-25-2006 07:10 AM

    Widening drop-down list at runtime

    I have an InfoPath form with a repeating section that I want to remain one line per item in the section. However, one of the items is a drop-down list whose values are kind of long. I would like the drop-down list to widen automatically when the user clicks on it to make his selection - so he can see not only the code but the length description too.

    I don't see an attribute that allows this to happen so I thought I would just do it myself programmatically since I already have C# code behind the form. However, I don't see how to create a
    handler for the Click event (or some other such event for a drop-down list). I thought if I could get the Click event and the control object I could set the width to be wider and then set it back after the user makes his choice.

    Is this possible or is there another way to achieve my goal? Do I have to pop up a secondary dialog box to act as the drop-down list?
    Laurie
  • 09-25-2006 04:38 PM In reply to

    Re: Widening drop-down list at runtime

    Hi Laurie,
    you can use two sections (with different width dropdowns bound to same data field) to conditionally control the width. This only gives two settings. If you need more dynamic settings, I would suggest either a) using a popup or b) taskpane. The view itself cannot be programmatically accessed since that would involve changing the XSL at runtime which isn't supported. However, switching between sections is supported and multiple controls can be bound to the same data field. Also, changing the width of a dropdown in the taskpane or a popup dialog is easy. Good luck!
    Patrick Halstead
    Project Manager at Qdabra
  • 09-26-2006 05:26 AM In reply to

    Re: Widening drop-down list at runtime

    I don't quite understand what you mean by using 2 sections. Is there an example on InfoPatnDev?

    What I have is a repeating table. Each row includes the drop-down box and a text box. The user selects an item from the drop-down lit and then edits the text box to comment on his selection. The comment is the most important item so I don't want to make it narrow. The drop-down list is like an account list where there is a number and a description. They need to see the description only to be sure they select the right account.

    I am trying to keep each row in the repeating table to a single line of controls if at all possible.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.