[C#] getting control properties - InfoPath Dev
in

InfoPath Dev

[C#] getting control properties

Last post 07-26-2010 03:45 AM by vahooz. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-20-2010 08:07 AM

    • vahooz
    • Not Ranked
    • Joined on 07-20-2010
    • Posts 4

    [C#] getting control properties

    Dear members, first of all 'Hello to everyone!' - I'm newbie on forum :-) I would like to ask you for advice. Could you tell me how to get width or height property of controls (ex. textbox) using C#? I've tried everything but from MSDN library references but it does not work. I'm using infopath 2007 and visual studio 2005. Best regards. Rob
  • 07-20-2010 08:34 AM In reply to

    Re: [C#] getting control properties

    There simply is no way to directly access a form's controls or the controls' properties from the form's code behind.  I suppose you could access the form's XSL and find out some information about the controls that way, but that would be far too complex to be worth your time.

    Would you mind sharing what it is you are trying to accomplish?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 07-20-2010 12:34 PM In reply to

    • vahooz
    • Not Ranked
    • Joined on 07-20-2010
    • Posts 4

    Re: [C#] getting control properties

    Jimmy:

    There simply is no way to directly access a form's controls or the controls' properties from the form's code behind.  I suppose you could access the form's XSL and find out some information about the controls that way, but that would be far too complex to be worth your time.

    Would you mind sharing what it is you are trying to accomplish?

    Hi Jimmy.
    Many thanks for fast response :-)
    I'm trying to make a form for entering information by user in two columns. The documents form height is static. I need to know what is the height of the textbox to see if it has already exceeded form and if so, finish typing in the first column and automatically unlock the second collumn (where is a next hidden textbox).

    I wrote a Jquery script to show you what effect I would like to have using infopath: http://c4.livenet.pl/sample1.php
    Just type in the first texarea sample text (mode than 50 chars or just 20 enters :-) ) until you will see 3 texareas on the screen. - then you see exactly what I mean.

    Regards. Robert.

    P.S:: I just realized that my sample script does not work in IE :D, so below screenshoots:

     

  • 07-26-2010 03:45 AM In reply to

    • vahooz
    • Not Ranked
    • Joined on 07-20-2010
    • Posts 4

    Re: [C#] getting control properties

    any feedback? :-)
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.