Show BOLD characters in Text Box field - particular request - not only "@crlf" - InfoPath Dev
in

InfoPath Dev

Show BOLD characters in Text Box field - particular request - not only "@crlf"

Last post 10-24-2008 08:51 AM by Jimmy. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 09-12-2008 02:39 AM

    • nine96
    • Not Ranked
    • Joined on 09-12-2008
    • Posts 2

    Show BOLD characters in Text Box field - particular request - not only "@crlf"

    Hi All,

    I am not able to show in a "read only text box" BOLD text.

    I have worked in "Text Box Propieties" -> "Value" -> ??? (which code?)

    i.e. For the new line I used the code "@crlf"

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

    I applyed the new line by code XML and using "Insert field or Group".

    How  can I show this text in this format by value rules?

    {

    Hello,

    My name is Nine96 (az).

    Thanks

    }

  • 09-17-2008 07:49 AM In reply to

    • Bhavesh
    • Top 500 Contributor
      Male
    • Joined on 05-01-2008
    • Atlanta
    • Posts 40

    Re: Show BOLD characters in Text Box field - particular request

    Hi,

    For displaying a readonly textbox data in BOLD you can use conditional formating.

    Put a textbox on the form. Set it's property to readonly. Add conditional formatting to it as follows

    Select field from first drop down on conditional formatting dialog

    select "is not blank" from second dropdown.

    select "Bold" checkbox from the available formatting option.

    Now when you populate some data in this textbox, it will be displayed as BOLD.

    Hope this will work for you.

    Bhavesh

  • 09-23-2008 03:03 AM In reply to

    • nine96
    • Not Ranked
    • Joined on 09-12-2008
    • Posts 2

    Re: Show BOLD characters in Text Box field - particular request

    Hi Bhavesh,

    I knokn this procedure, but my request is different: I would want mixing the BOLD carachters and normal carachters in the same text box.

    I do not know whitch esa-code I have to use.

    1.) However the target is this:

    PROGRAM

    Hi customer,

    customer xyz.

    2.) To show this statement in a box I use:

    "Text Box Properties" -> Value = Concat("PROGRAM", @crlf, "Hi customer,", @crlf,"message xyz.")

    3.) But the result is:

    PROGRAM

    Hi customer,

    message xyz.

    4.) Note: @crlf is used as Carriage Return

    Regards,

    Nino.

  • 10-24-2008 06:17 AM In reply to

    • Bhavesh
    • Top 500 Contributor
      Male
    • Joined on 05-01-2008
    • Atlanta
    • Posts 40

    Re: Show BOLD characters in Text Box field - particular request

    Hi,

    I have really no idea of making half of the text in a text box making BOLD. I have some similar requirement that when user open a form for modification and go to any field it should clear the previously entered data and the new text should be in window blue color so that user can identify the fields that has been changed. In short, on the GUI prev. filled text will be in normal blank font and new modified data will be in blue.

    I could not acheive it till. if u have any idea then can share....

    Thanks

    Bhavesh

  • 10-24-2008 08:51 AM In reply to

    Re: Show BOLD characters in Text Box field - particular request

    Nine96, for what you're asking the simplest solution is to use several expression boxes side-by-side and give some of them bold formatting.  For your first example, use one expression box to show "My name is ", another box to show the value of the field in bold, one to show " (", one to show the value of the next field, and one last one to show ")".

    An ordinary text box can only show one formatting style at a time.  A rich text box can be more complex, but it is tricky to modify and requires code.

    Bhavesh, to accomplish what you are trying to do, you can use ____isChanged flags to apply conditional formatting to fields, then set all the flags to false right before the form is submitted.  This would require writing a bit of code in the fields' onChanged events. 

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.