bold text - InfoPath Dev
in

InfoPath Dev

bold text

Last post 03-31-2010 04:40 AM by Hoveyg. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 03-28-2010 11:39 PM

    • mhoel
    • Not Ranked
    • Joined on 01-25-2010
    • Posts 17

    bold text

    Hi.

    I have 2 textboxes, one for commentarys (txtCommentary) and one for the commentary history (txt_History). When the users press a button, it takes the commentary and puts it into txt_History with this rule: concat("some text "; txtCommentary).

    Is it possible to bold the text from the txtCommentary box ind the txtHistory, so its more like concat("Some text "; txtCommentary)?

  • 03-28-2010 11:51 PM In reply to

    No, there isn't a way to make just part of a text box or expression box bold (unless it's a rich text box, which is a whole separate story).

    Might it work to have the text "Some text" in an expression box next to another bolded expression box with the saved value from txtHistory, to simulate the actual contents of txtCommentary?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-29-2010 12:25 AM In reply to

    • mhoel
    • Not Ranked
    • Joined on 01-25-2010
    • Posts 17

    If I change them to rich textboxes, how can it be done then?

  • 03-29-2010 06:49 AM In reply to

     Does the approach I suggested not work for you?

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 03-30-2010 02:38 AM In reply to

    • mhoel
    • Not Ranked
    • Joined on 01-25-2010
    • Posts 17

    Hi again.

    Im not sure, that i understand the solution you suggested?

  • 03-30-2010 10:01 AM In reply to

    Hi mhoel,

    Not sure if I can explain it any different....

    Jimmy:
    Might it work to have the text "Some text" in an expression box next to another bolded expression box with the saved value from txtHistory, to simulate the actual contents of txtCommentary?

    Have 2 Expression boxes on your form side by side...

    Expression box #1, set the XPath formula to point to your txtCommentary textbox, and set box#2 to txtHistory.  Bold the contents of txtHistory expression and your good to go.  Not sure if its the look you are looking for.. if text box #1 text is too long, it'll wrap, if its too short, it'll leave a big gap between the history box.

     I tried toying with the rich text box a bit, when I concatenated the 2 fields, it never carried over the text formating from the rich text formating, just the actual values.  Was hoping I could have concatenated in some HTML or special flags to merge the 2, but that didnt' work either.  ie (Concat(txtCommentary, '{strong}', txtHistory, '{/ strong }.

     I've been trying to do something simliar, solution might be the same for both.  I was wanting to put in a carriage return in between history inserts so they'll be on seperate lines..  ie.. concat(Field1, "\newline", Field2).. but have been unable to find a solution for this either.

    Greg

     

  • 03-31-2010 12:04 AM In reply to

    • mhoel
    • Not Ranked
    • Joined on 01-25-2010
    • Posts 17

    Hi.

    Its not really what i want, it should look like this.

    Some text + date + user

         Comment

    Some new text + date + user

         another Comment

    And then i should be able to use this data in sharepoint designer for my workflow.

     

    About the carriage return thing, i found a couple of years ago a site where they had a solution for that. You create a file named Characters.xml and paste this into it and save it.

     <?xml version="1.0" encoding="UTF-8"?>
    <characters
        cr="&#xD;"
        lf="&#xA;"
        crlf="&#xD;&#xA;"
    />

    Then in Infopath, you create a dataconnection where you receive from this XML document.

    When you need a carriage return, you choose this dataconnection and choose the CRLF. It works for me.

  • 03-31-2010 04:40 AM In reply to

    Thanks mhoel,

     I never got it to work yet, might just take me some more tinkering..  Thank you though for getting me on the right track..

     I was wondering, could we do the same type of thing for the bold thing?  Add a new entry into your xml characters file.. find the string combination for bold?

    Anyway, just a thought.. might not be possible..

    Greg

    Ammendment:

    Just found this website, it explains how to add HTML tags to a rich text box..  You could render the html bold (strong) tags into the rich text box, might work for you.

    http://www.bizsupportonline.net/infopath2007/how-to-render-html-in-rich-text-box-infopath.htm

     

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