Inserting text into TableCell at runtime

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jurjen de Groot

    #1

    Inserting text into TableCell at runtime


    I want to show a variable length field within a cell in a table. <TD>
    ....here... </TD>

    I'm not sure how to do that, the information is stored in a class property
    Org.CVtext

    I can't use a textbox because it might not show all text and when printing
    this page the info is incomplete. I've tried using a label but then all
    VBCRLF aren't rendered and the text is just one long sentence. There must be
    some way to show this....


    Any help is greatly appreciated.


    Jurjen de Groot
    Netherlands


  • Xavier MT

    #2
    Re: Inserting text into TableCell at runtime

    Quick workaround, im sure there are better solutions but you can use html
    tags
    for example with a label
    Label1.Text = "first line " & vbnewline & "second line"

    Change it to

    Label1.Text = "first line <br> second line"



    Just use a replace function if only crlf is your problem



    xavier


    "Jurjen de Groot" <info@gits-online.nl> wrote in message
    news:%23WqCPFcZ DHA.628@TK2MSFT NGP10.phx.gbl.. .[color=blue]
    >
    > I want to show a variable length field within a cell in a table. <TD>
    > ...here... </TD>
    >
    > I'm not sure how to do that, the information is stored in a class property
    > Org.CVtext
    >
    > I can't use a textbox because it might not show all text and when printing
    > this page the info is incomplete. I've tried using a label but then all
    > VBCRLF aren't rendered and the text is just one long sentence. There must[/color]
    be[color=blue]
    > some way to show this....
    >
    >
    > Any help is greatly appreciated.
    >
    >
    > Jurjen de Groot
    > Netherlands
    >
    >[/color]


    Comment

    • Xavier MT

      #3
      Re: Inserting text into TableCell at runtime

      Quick workaround, im sure there are better solutions but you can use html
      tags
      for example with a label
      Label1.Text = "first line " & vbnewline & "second line"

      Change it to

      Label1.Text = "first line <br> second line"



      Just use a replace function if only crlf is your problem



      xavier


      "Jurjen de Groot" <info@gits-online.nl> wrote in message
      news:%23WqCPFcZ DHA.628@TK2MSFT NGP10.phx.gbl.. .[color=blue]
      >
      > I want to show a variable length field within a cell in a table. <TD>
      > ...here... </TD>
      >
      > I'm not sure how to do that, the information is stored in a class property
      > Org.CVtext
      >
      > I can't use a textbox because it might not show all text and when printing
      > this page the info is incomplete. I've tried using a label but then all
      > VBCRLF aren't rendered and the text is just one long sentence. There must[/color]
      be[color=blue]
      > some way to show this....
      >
      >
      > Any help is greatly appreciated.
      >
      >
      > Jurjen de Groot
      > Netherlands
      >
      >[/color]


      Comment

      • Kevin Spencer

        #4
        Re: Inserting text into TableCell at runtime

        In HTML, CRLF characters are just "white space" characters, and are not
        rendered as line breaks. Line breaks in HTML are rendered via the "<br>"
        tag. So, if you want your line breaks in there, you need to replace them
        with "<br>" tags. You can do this with the String.Replace( ) method.

        --
        HTH,

        Kevin Spencer
        Microsoft MVP
        ..Net Developer
        All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

        Neither a follower nor a lender be.

        "Jurjen de Groot" <info@gits-online.nl> wrote in message
        news:%23WqCPFcZ DHA.628@TK2MSFT NGP10.phx.gbl.. .[color=blue]
        >
        > I want to show a variable length field within a cell in a table. <TD>
        > ...here... </TD>
        >
        > I'm not sure how to do that, the information is stored in a class property
        > Org.CVtext
        >
        > I can't use a textbox because it might not show all text and when printing
        > this page the info is incomplete. I've tried using a label but then all
        > VBCRLF aren't rendered and the text is just one long sentence. There must[/color]
        be[color=blue]
        > some way to show this....
        >
        >
        > Any help is greatly appreciated.
        >
        >
        > Jurjen de Groot
        > Netherlands
        >
        >[/color]


        Comment

        • Kevin Spencer

          #5
          Re: Inserting text into TableCell at runtime

          In HTML, CRLF characters are just "white space" characters, and are not
          rendered as line breaks. Line breaks in HTML are rendered via the "<br>"
          tag. So, if you want your line breaks in there, you need to replace them
          with "<br>" tags. You can do this with the String.Replace( ) method.

          --
          HTH,

          Kevin Spencer
          Microsoft MVP
          ..Net Developer
          All hotels in Benidorm. The best selection of Benidorm hotels with reviews and maps. Book in advance and save.

          Neither a follower nor a lender be.

          "Jurjen de Groot" <info@gits-online.nl> wrote in message
          news:%23WqCPFcZ DHA.628@TK2MSFT NGP10.phx.gbl.. .[color=blue]
          >
          > I want to show a variable length field within a cell in a table. <TD>
          > ...here... </TD>
          >
          > I'm not sure how to do that, the information is stored in a class property
          > Org.CVtext
          >
          > I can't use a textbox because it might not show all text and when printing
          > this page the info is incomplete. I've tried using a label but then all
          > VBCRLF aren't rendered and the text is just one long sentence. There must[/color]
          be[color=blue]
          > some way to show this....
          >
          >
          > Any help is greatly appreciated.
          >
          >
          > Jurjen de Groot
          > Netherlands
          >
          >[/color]


          Comment

          • Xavier MT

            #6
            Re: Inserting text into TableCell at runtime

            That's what I said just that Kevin explained it the way it should be
            explained :P

            Just trying to help and I need some help



            "Xavier MT" <xmorera@hotmai l.com> wrote in message
            news:%23jnZaMcZ DHA.1004@TK2MSF TNGP12.phx.gbl. ..[color=blue]
            > Quick workaround, im sure there are better solutions but you can use html
            > tags
            > for example with a label
            > Label1.Text = "first line " & vbnewline & "second line"
            >
            > Change it to
            >
            > Label1.Text = "first line <br> second line"
            >
            >
            >
            > Just use a replace function if only crlf is your problem
            >
            >
            >
            > xavier
            >
            >
            > "Jurjen de Groot" <info@gits-online.nl> wrote in message
            > news:%23WqCPFcZ DHA.628@TK2MSFT NGP10.phx.gbl.. .[color=green]
            > >
            > > I want to show a variable length field within a cell in a table. <TD>
            > > ...here... </TD>
            > >
            > > I'm not sure how to do that, the information is stored in a class[/color][/color]
            property[color=blue][color=green]
            > > Org.CVtext
            > >
            > > I can't use a textbox because it might not show all text and when[/color][/color]
            printing[color=blue][color=green]
            > > this page the info is incomplete. I've tried using a label but then all
            > > VBCRLF aren't rendered and the text is just one long sentence. There[/color][/color]
            must[color=blue]
            > be[color=green]
            > > some way to show this....
            > >
            > >
            > > Any help is greatly appreciated.
            > >
            > >
            > > Jurjen de Groot
            > > Netherlands
            > >
            > >[/color]
            >
            >[/color]


            Comment

            • Xavier MT

              #7
              Re: Inserting text into TableCell at runtime

              That's what I said just that Kevin explained it the way it should be
              explained :P

              Just trying to help and I need some help



              "Xavier MT" <xmorera@hotmai l.com> wrote in message
              news:%23jnZaMcZ DHA.1004@TK2MSF TNGP12.phx.gbl. ..[color=blue]
              > Quick workaround, im sure there are better solutions but you can use html
              > tags
              > for example with a label
              > Label1.Text = "first line " & vbnewline & "second line"
              >
              > Change it to
              >
              > Label1.Text = "first line <br> second line"
              >
              >
              >
              > Just use a replace function if only crlf is your problem
              >
              >
              >
              > xavier
              >
              >
              > "Jurjen de Groot" <info@gits-online.nl> wrote in message
              > news:%23WqCPFcZ DHA.628@TK2MSFT NGP10.phx.gbl.. .[color=green]
              > >
              > > I want to show a variable length field within a cell in a table. <TD>
              > > ...here... </TD>
              > >
              > > I'm not sure how to do that, the information is stored in a class[/color][/color]
              property[color=blue][color=green]
              > > Org.CVtext
              > >
              > > I can't use a textbox because it might not show all text and when[/color][/color]
              printing[color=blue][color=green]
              > > this page the info is incomplete. I've tried using a label but then all
              > > VBCRLF aren't rendered and the text is just one long sentence. There[/color][/color]
              must[color=blue]
              > be[color=green]
              > > some way to show this....
              > >
              > >
              > > Any help is greatly appreciated.
              > >
              > >
              > > Jurjen de Groot
              > > Netherlands
              > >
              > >[/color]
              >
              >[/color]


              Comment

              Working...