4 Replies Latest reply on Sep 2, 2006 12:22 PM by Newsgroup_User

    textbox and different fonts, color and size

    Level 7

      I need to put in a text box different typographies, size and color done
      through programming in Lingo.
      For example in the same text box (or field) :

      Font Arial color Red size 20 in the first line
      Font Times new roman color blue size 12 in the next four lines.
      Font Arial color Red size 20 in the next line... and so on.

      Is it possible to do it with Lingo? Can you tell me an example?

      Thank you very much


        • 1. Re: textbox and different fonts, color and size
          Level 7
          Anne wrote:
          > I need to put in a text box different typographies, size and color
          > done through programming in Lingo.
          > For example in the same text box (or field) :
          >
          > Font Arial color Red size 20 in the first line
          > Font Times new roman color blue size 12 in the next four lines.
          > Font Arial color Red size 20 in the next line... and so on.
          >
          > Is it possible to do it with Lingo? Can you tell me an example?

          It would probably be easiest to create the html for it and put that into a
          text member:

          stuff="<html><head><title></title></head><body bgcolor=#FFFFFF>"
          stuff=stuff & "<p><font face=Arial color=red>Red Arial</font><br>"
          stuff=stuff & "you get the idea<br>"
          stuff=stuff & "</body></html>"
          member("yourDisplayedMember").html=stuff

          Bear in mind that Director understands only a mix of HTML 1.0 and HTML+.

          Also, you might need to put attributes in quotes, like:
          stuff=stuff & "<p><font face=" & quote & "Arial" & quote & " color=" & quote
          & "red" & quote & ">Red Arial</font><br>"

          Andrew


          • 2. Re: textbox and different fonts, color and size
            Level 7
            Thank you.
            The problem is that i have to load over 200 block of text in the same text
            castmember, using variables.
            I think this is complicated to get what I need.
            Is there any other way?

            Thanks again.



            "Andrew Morton" <akm@in-press.co.uk.invalid> escribi� en el mensaje
            news:ed9k6v$7dt$1@forums.macromedia.com...
            > Anne wrote:
            >> I need to put in a text box different typographies, size and color
            >> done through programming in Lingo.
            >> For example in the same text box (or field) :
            >>
            >> Font Arial color Red size 20 in the first line
            >> Font Times new roman color blue size 12 in the next four lines.
            >> Font Arial color Red size 20 in the next line... and so on.
            >>
            >> Is it possible to do it with Lingo? Can you tell me an example?
            >
            > It would probably be easiest to create the html for it and put that into a
            > text member:
            >
            > stuff="<html><head><title></title></head><body bgcolor=#FFFFFF>"
            > stuff=stuff & "<p><font face=Arial color=red>Red Arial</font><br>"
            > stuff=stuff & "you get the idea<br>"
            > stuff=stuff & "</body></html>"
            > member("yourDisplayedMember").html=stuff
            >
            > Bear in mind that Director understands only a mix of HTML 1.0 and HTML+.
            >
            > Also, you might need to put attributes in quotes, like:
            > stuff=stuff & "<p><font face=" & quote & "Arial" & quote & " color=" &
            > quote & "red" & quote & ">Red Arial</font><br>"
            >
            > Andrew
            >


            • 3. Re: textbox and different fonts, color and size
              Level 7
              Hello:
              This is what I need:

              I have three titles and three block of text, and I need to format in this
              way, but I can't get it, this does not work.
              Is not possible to get this?

              H="Many many text Many many textMany many textMany many textMany many
              textMany many textMany many text"
              D="More more text More more textMore more textMore more textMore more
              textMore more textMore more text"
              ----TITLE 1------
              member("Yac").font="Copperplate"
              member("Yac").forecolor=33
              member("Yac").fontsize=14
              member("Yac").text="History" & RETURN& RETURN
              ----BLOCK OF TEXT 1------
              member("Yac").fontsize=12
              member("Yac").font="arial"
              member("Yac").forecolor=12
              put H &RETURN & RETURN after member("Yac")
              ----TITLE 2------
              member("Yac").font="Copperplate"
              member("Yac").forecolor=33
              member("Yac").fontsize=14
              put "Description:" & RETURN & RETURN after member("Yac")
              ----BLOCK OF TEXT 2---
              member("Yac").fontsize=12
              member("Yac").font="arial"
              member("Yac").forecolor=12
              put D & RETURN after member("Yac")...


              Thank you very much..


              • 4. Re: textbox and different fonts, color and size
                Level 7
                On Sat, 02 Sep 2006 17:25:38 GMT, Anne posted in macromedia.director.lingo:

                > member("Yac").font="Copperplate"
                > member("Yac").forecolor=33
                > member("Yac").fontsize=14
                > member("Yac").text="History" & RETURN& RETURN

                If you keep track of the line numbers, you can specify them

                ----TITLE 1------
                member("Yac").text="History" & RETURN& RETURN
                member("Yac").line[1].font="Copperplate"
                member("Yac").line[1].forecolor=33
                member("Yac").line[1].fontsize=14
                ----BLOCK OF TEXT 1------
                put H &RETURN & RETURN after member("Yac")
                member("Yac").line[3].fontsize=12
                member("Yac").line[3].font="arial"
                member("Yac").line[3].forecolor=12

                etc...



                --
                Mark A. Boyd
                Keep-On-Learnin' :)