Highlight Text Box - InfoPath Dev
in

InfoPath Dev

Highlight Text Box

Last post 01-14-2007 01:22 PM by Matt Faus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-10-2007 10:07 AM

    Highlight Text Box

    Is there any way to highlight just the text in an RTF field, instead of the entire box? It looks like this currently...

    MILESTONES-STEREO*****************

    The "*" represents yellow highlighting.

    Another solution maybe to somehow make the RTF Box dynamic so that it only expand its width by the length of the text.

    Any thoughts are much appreciated!
  • 01-11-2007 08:50 AM In reply to

    Buenos dias Javier,

    If you are using a rich text box you can control the exact XHTML that comprises it with code, but this might be a little more than you are looking to do. Are you using any code in your solution at all? If so, you can select the node that this information is stored in the DOM, load the contents into a IXMLDOMDocument object and parse the nodes this way. After this is done you will need to insert the new XHTML into the parent node.

    Or you could try your other option. To do this, double-click the control and change to the Size tab. In the width section type "auto". The only downside of this is that if the user has to type into this box it will be next to impossible because when it is blank the width will be ~1px.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 01-12-2007 07:26 AM In reply to

    Matt,

    When I use the width trick, it cuts out the text in the textbox. Changing the alignment has no affect on this.

    Any thoughts?
  • 01-14-2007 01:22 PM In reply to

    Did you make sure that in the "Design" tab the option to "expand to fit text" was chosen? This would cause a problem if not.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.