How to change text in TextBox and it's width programaticly - InfoPath Dev
in

InfoPath Dev

How to change text in TextBox and it's width programaticly

Last post 07-17-2008 07:16 AM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-15-2008 02:28 PM

    How to change text in TextBox and it's width programaticly

    I have a few TextBoxes and I want to write a procedure like that:

    If my.txtField1.text = "" Then
    my.txtField1.width = 100%
    Else
    my.txtField1.width = auto
    End If

    But unfortunately the only thing I can do is  getting the content of TextBox using msgbox:

    Sub msoxd_my_txtField1_OnValidate(eventObj)
    msgbox XDocument.DOM.selectSingleNode(".//my:txtField1").text
    End Sub

    Could you please help me!

  • 07-17-2008 07:16 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: How to change text in TextBox and it's width programaticly

    Hello,

    We can’t change the width of the text box in programmatically. Those properties are available in .xslt file. These width setting properties are we can change directly in UI otherwise we have to get the view.xslt file and after our modification we have to save the .xslt file.

    Directly modifying the .xslt file through programmatically, me not suggesting doing.

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.