none
RichTextBox row height

    Question

  • When I try to do this:

    Xxxx Xxxxxx

    999-999-9999

    Xxxxxx Xxxxx

    888-888-8888

    Yyyy Yyyyyy

    999-999-9999

    111 My Street

    Yyyyyy Yyyyy

    999-999-9999

    111 My Street

    Yyyy Yyyyyy

    999-999-9999

    111 My Street

    Yyyy Yyyyyy

    999-999-9999

    111 My Street

    I get something like this:

    Xxxx Xxxxxx 999-999-9999 Xxxxxx Xxxxx 888-888-8888

                                                                               Yyyy Yyyyyy 999-999-9999 111 My Street Yyyyyy Yyyyy 999-999-9999 111 My Street Yyyy Yyyyyy 999-999-9999 111 My Street Yyyyyy Yyyyy 999-999-9999 111 My Street Yyyy Yyyyyy 999-999-9999 111 My Street Yyyyyy Yyyyy 999-999-9999 111 My Street

     

    Imagine there is a cell division in the between the first and second 8s in the cell because that is how it looks in the RTB, I would paste in a picture, but apparently that is not an option.

     

    First problem: Is there a way in a cell to make "\par"s act like they are supposed to (they turn into spacesin the RTB).

     

    Second: Though it doesn't look like it from this example all of the text acts as one line and not two cells, this happens when the text in cell one is longer than the width of cell one.

     

    Third: How can I make the cell/row height be greater than one line? I have tried \trrhN with no success as well as the different autofits.Any help would be appreciated

     

    This is the rtf code:

    Code Snippet
    {\rtf1
    \trowd \trgaph108
    \cellx4320
    \cellx8748\pard
    \intbl
    {\b Xxxx Xxxxxx\par }
    { 999-999-9999\par Xxxxxx Xxxxx\par 999-999-9999\cell Yyyy Yyyyyy\par 999-999-9999}
    {\par 111 My Street}
    {\par }
    { Yyyyyy Yyyyy\par 999-999-9999\par }
    { 111 My Street}
    {\par }
    { Yyyy Yyyyyy\par 999-999-9999\par }
    { 111 My Street}
    {\par }
    { Yyyyyy Yyyyy\par 999-999-9999\par }
    { 111 My Street}
    {\par }
    { Yyyy Yyyyyy\par 999-999-9999\par }
    { 111 My Street}
    {\par }
    { Yyyyyy Yyyyy\par 999-999-9999}
    {\par 111 My Street}
    {\cell }\pard \intbl
    { \trowd \trgaph108
    \clbrdrt\brdrs\brdrw10
    \clbrdrl\brdrs\brdrw10
    \clbrdrb\brdrs\brdrw10
    \clbrdrr\brdrs\brdrw10
    \cellx4320\
    \clbrdrt\brdrs\brdrw10
    \clbrdrl\brdrs\brdrw10
    \clbrdrb\brdrs\brdrw10
    \clbrdrr\brdrs\brdrw10
    \cellx8748\row }\pard
    {\par }}

     

    Lest you think that minimal code is the problem, the following gives the same result (directly from Word 2000):

    Code Snippet

    {\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch13\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe2052{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
    {\f13\fnil\fcharset134\fprq2{\*\panose 02010600030101010101}SimSun{\*\falt ??\'a8\'ac?};}{\f36\fnil\fcharset134\fprq2{\*\panose 00000000000000000000}@SimSun;}{\f39\froman\fcharset238\fprq2 Times New Roman CE;}
    {\f40\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\froman\fcharset162\fprq2 Times New Roman Tur;}{\f44\froman\fcharset177\fprq2 Times New Roman (Hebrew);}
    {\f45\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f171\fnil\fcharset0\fprq2 SimSun Western{\*\falt ??\'a8\'ac?};}
    {\f401\fnil\fcharset0\fprq2 @SimSun Western;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;
    \red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
    \fs24\lang1033\langfe2052\loch\f0\hich\af0\dbch\af13\cgrid\langnp1033\langfenp2052 \snext0 \styrsid6979382 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
    \ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
    \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\*\ts15\tsrowd\trbrdrt\brdrs\brdrw10 \trbrdrl\brdrs\brdrw10
    \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
    \trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
    \fs20\lang1024\langfe1024\loch\f0\hich\af0\dbch\af13\cgrid\langnp1024\langfenp1024 \sbasedon11 \snext15 \styrsid8679941 Table Grid;}}{\*\rsidtbl \rsid880295\rsid2911981\rsid6104921\rsid6979382\rsid7562529\rsid8679941\rsid13240114\rsid13317129}
    {\*\generator Microsoft Word 10.0.2627;}{\info{\title Abc}{\author Charles}{\operator Charles}{\creatim\yr2007\mo7\dy30\hr22\min55}{\revtim\yr2007\mo7\dy31\hr16\min54}{\version3}{\edmins377}{\nofpages1}{\nofwords43}{\nofchars247}{\nofcharsws289}
    {\vern16437}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale144\viewzk2\nolnhtadjtbl\rsidroot13317129
    \fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4
    \pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}
    {\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\trowd \irow0\irowband0\lastrow \ts15\trgaph108\trleft-108\trbrdrt\brdrs\brdrw10 \trbrdrl
    \brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
    \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
    \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx4320\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx8748\pard\plain
    \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0\pararsid8679941 \fs24\lang1033\langfe2052\loch\af0\hich\af0\dbch\af13\cgrid\langnp1033\langfenp2052 {\b\insrsid8679941\charrsid8679941 \hich\af0\dbch\af13\loch\f0 Xxxx Xxxxxx
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 999-999-9999
    \par \hich\af0\dbch\af13\loch\f0 Xxxxxx Xxxxx
    \par \hich\af0\dbch\af13\loch\f0 999-999-9999\cell \hich\af0\dbch\af13\loch\f0 Yyyy}{\insrsid8679941\charrsid8679941 \hich\af0\dbch\af13\loch\f0  }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y
    \hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 999-999-9999}{\insrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 111 My Street}{\insrsid8679941\charrsid8679941
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941 \hich\af0\dbch\af13\loch\f0 
    }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 999-999-9999
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 111 My Street}{\insrsid8679941\charrsid8679941
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941 \hich\af0\dbch\af13\loch\f0  }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y
    \hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 999-999-9999
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 111 My Street}{\insrsid8679941\charrsid8679941
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941 \hich\af0\dbch\af13\loch\f0 
    }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 999-999-9999
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 111 My Street}{\insrsid8679941\charrsid8679941
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941 \hich\af0\dbch\af13\loch\f0  }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y
    \hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 999-999-9999
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 111 My Street}{\insrsid8679941\charrsid8679941
    \par }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941 \hich\af0\dbch\af13\loch\f0 
    }{\insrsid8679941 \hich\af0\dbch\af13\loch\f0 Y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y\hich\af0\dbch\af13\loch\f0 y}{\insrsid8679941\charrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 999-999-9999}{\insrsid8679941
    \par \hich\af0\dbch\af13\loch\f0 111 My Street}{\insrsid8679941\charrsid8679941 \cell }\pard \ql \li0\ri0\widctlpar\intbl\aspalpha\aspnum\faauto\adjustright\rin0\lin0 {\insrsid8679941 \trowd \irow0\irowband0\lastrow \ts15\trgaph108\trleft-108\trbrdrt
    \brdrs\brdrw10 \trbrdrl\brdrs\brdrw10 \trbrdrb\brdrs\brdrw10 \trbrdrr\brdrs\brdrw10 \trbrdrh\brdrs\brdrw10 \trbrdrv\brdrs\brdrw10
    \trftsWidth1\trftsWidthB3\trftsWidthA3\trautofit1\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tbllkhdrrows\tbllklastrow\tbllkhdrcols\tbllklastcol \clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr
    \brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx4320\clvertalt\clbrdrt\brdrs\brdrw10 \clbrdrl\brdrs\brdrw10 \clbrdrb\brdrs\brdrw10 \clbrdrr\brdrs\brdrw10 \cltxlrtb\clftsWidth3\clwWidth4428\clshdrawnil \cellx8748\row }\pard
    \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid2911981 {\insrsid8679941\charrsid8679941
    \par }}

     

     

     

    Tuesday, July 31, 2007 11:33 PM

Answers

  • The .NET RichTextBox control uses a pretty old version of the native Windows RichText control.  It simply does not support \par in table cells.  I noticed that the XP version of Wordpad.exe does support it.  That set me thinking: what if I create an RTB that uses the XP version of the RichText control.  Whooptidoo, it worked.  Add a new class to your project and paste the code below.  Build.  Drag and drop the control from the top of the toolbox onto your form.  One thing I didn't do was to check if every RTB property is correctly supported by the new version.  Hopefully, you won't have too much trouble.

    using System;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;

    public class RichTextBox5 : RichTextBox {
      private static IntPtr moduleHandle;

      protected override CreateParams CreateParams {
        get {
          if (moduleHandle == IntPtr.Zero) {
            moduleHandle = LoadLibrary("msftedit.dll");
            if ((long)moduleHandle < 0x20) throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not load Msftedit.dll");
          }
          CreateParams createParams = base.CreateParams;
          createParams.ClassName = "RichEdit50W";
          if (this.Multiline) {
            if (((this.ScrollBars & RichTextBoxScrollBars.Horizontal) != RichTextBoxScrollBars.None) && !base.WordWrap) {
              createParams.Style |= 0x100000;
              if ((this.ScrollBars & ((RichTextBoxScrollBars)0x10)) != RichTextBoxScrollBars.None) {
                createParams.Style |= 0x2000;
              }
            }
            if ((this.ScrollBars & RichTextBoxScrollBars.Vertical) != RichTextBoxScrollBars.None) {
              createParams.Style |= 0x200000;
              if ((this.ScrollBars & ((RichTextBoxScrollBars)0x10)) != RichTextBoxScrollBars.None) {
                createParams.Style |= 0x2000;
              }
            }
          }
          if ((BorderStyle.FixedSingle == base.BorderStyle) && ((createParams.Style & 0x800000) != 0)) {
            createParams.Style &= -8388609;
            createParams.ExStyle |= 0x200;
          }
          return createParams;
        }
      }
      // P/Invoke declarations
      [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
      private static extern IntPtr LoadLibrary(string path);

    }

    Wednesday, August 01, 2007 12:31 PM
    Moderator

All replies

  • The .NET RichTextBox control uses a pretty old version of the native Windows RichText control.  It simply does not support \par in table cells.  I noticed that the XP version of Wordpad.exe does support it.  That set me thinking: what if I create an RTB that uses the XP version of the RichText control.  Whooptidoo, it worked.  Add a new class to your project and paste the code below.  Build.  Drag and drop the control from the top of the toolbox onto your form.  One thing I didn't do was to check if every RTB property is correctly supported by the new version.  Hopefully, you won't have too much trouble.

    using System;
    using System.ComponentModel;
    using System.Windows.Forms;
    using System.Runtime.InteropServices;

    public class RichTextBox5 : RichTextBox {
      private static IntPtr moduleHandle;

      protected override CreateParams CreateParams {
        get {
          if (moduleHandle == IntPtr.Zero) {
            moduleHandle = LoadLibrary("msftedit.dll");
            if ((long)moduleHandle < 0x20) throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not load Msftedit.dll");
          }
          CreateParams createParams = base.CreateParams;
          createParams.ClassName = "RichEdit50W";
          if (this.Multiline) {
            if (((this.ScrollBars & RichTextBoxScrollBars.Horizontal) != RichTextBoxScrollBars.None) && !base.WordWrap) {
              createParams.Style |= 0x100000;
              if ((this.ScrollBars & ((RichTextBoxScrollBars)0x10)) != RichTextBoxScrollBars.None) {
                createParams.Style |= 0x2000;
              }
            }
            if ((this.ScrollBars & RichTextBoxScrollBars.Vertical) != RichTextBoxScrollBars.None) {
              createParams.Style |= 0x200000;
              if ((this.ScrollBars & ((RichTextBoxScrollBars)0x10)) != RichTextBoxScrollBars.None) {
                createParams.Style |= 0x2000;
              }
            }
          }
          if ((BorderStyle.FixedSingle == base.BorderStyle) && ((createParams.Style & 0x800000) != 0)) {
            createParams.Style &= -8388609;
            createParams.ExStyle |= 0x200;
          }
          return createParams;
        }
      }
      // P/Invoke declarations
      [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Auto)]
      private static extern IntPtr LoadLibrary(string path);

    }

    Wednesday, August 01, 2007 12:31 PM
    Moderator
  • Hi,

    I was using the RTF tag /v.../v0 to hide text in my RichTextBox, like this:

    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}

    \viewkind4\uc1\pard\f0\fs17 \v Tag#1\v0 Value = 1\v Tag#1\v0 \par

    }

    This appears like this in the RichTextBox:

    Value = 1

     

    With the default RichTextBox,  the RichTextBox.Text member shows this:

    "Tag#1Value = 1Tag#1"

     

    I tried using the 5.0 version of the RTB (as above) to get transparency, but it's changed this behavior. I now get this in RichTextBox.Text:

    "Value= 1"

    (I.e. the hidden text is missing.)

     

    The RTF is:

    {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}}

    {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs17 \v Tag#1\v0 Value = 1\v Tag#1\v0 \par

    }

    Which is indentical except for the "generator" field.

     

    Any ideas how to get the previous behavior with the new RTB 5.0?

     

    Tuesday, August 21, 2007 7:35 PM
  • Hello nobugz,

     

    I translated your solution above into VB.Net and it is working pretty well for the most part. But occasionaly I will get results similar to below. Any ideas on what might be causing this or how to fix it?

     

    Tower

    Section

    Feed Line

    Record No.

    Description

    Feed Line

    Segment Elev.

    Ka

    No Ice

    Ka

    Ice

    T1

    1

    Safety Line 3/8

    230.00 - 250.00

    0.6000

    0.3577

     

    T1

    2

    1 1/4" Rigid Conduit

    230.00 - 250.00

    0.6000

    0.3577

    T1

    3

    LDF7-50A (1-5/8 FOAM)

    230.00 - 240.00

    1.0000

    0.3577

    T2

    1

    Safety Line 3/8

    210.00 - 230.00

    0.6000

    0.3812

     

    The above example does not quite render correctly when I copy it. In the actual case, the first 2 rows are the

    same width, but then rows 3 - 6 have the numbers with the dash over each other as a 2 line row. In the actual rich text

    box, the above are all rows in the same table with different widths.

     

    The same thing is true in the example below. The first 2 rows are much shorter. The last colum is a normal size column based on the text and then the other rows stick way out to the side as shown. Sorry there is no way to attach a jpeg so

    you can see exactly what I am seeing. The grid lines are present in the 2nd set below, but they did not copy.

     

    Description

    Face

    or

    Leg

    Offset

    Type

    Offsets:

    Horz
    Lateral
    Vert
    ft

    ft

    ft

    Azimuth

    Adjustment

     

    °

    Placement

     

     

    ft

     

    CAAA

    Front

     

    ft2

    CAAA

    Side

     

    ft2

    Weight

     

     

    K

    Beacon

    B

    From Leg

    0.000

    0.000

    1.500

    0.000

    250.000

    No Ice

    1/2'' Ice

    1'' Ice

    2.400

    2.670

    2.960

    2.400

    2.670

    2.960

    0.073

    0.097

    0.123

     

    (4) RWA 80017

    C

    From Leg

    2.000

    0.000

    0.000

    0.000

    240.000

    No Ice

    1/2'' Ice

    1'' Ice

    10.912

    11.376

    11.858

    7.081

    7.484

    7.918

    0.031

    0.091

    0.157

    (4) 2'' sch 40 x 96'' pipe

    C

    From Leg

    2.000

    0.000

    0.000

    0.000

    240.000

    No Ice

    1/2'' Ice

    1'' Ice

    0.000

    0.000

    0.000

    1.900

    2.728

    3.401

    0.029

    0.043

    0.063

    12' KD T-frame

    C

    From Leg

    2.000

    0.000

    0.000

    0.000

    240.000

    No Ice

    1/2'' Ice

    1'' Ice

    7.693

    10.868

    13.990

    4.187

    5.788

    7.460

    0.243

    0.342

    0.474

    Wednesday, December 12, 2007 7:02 AM
  • Your solution looks good but I have no idea how to add this to the RichTextBoxControl. All I got from the toolbox build was a new toolbar icon that does nothing.

     

    However, after pasting the RichTextBox5 class into a windows form and running the debug once, RichTextBox5 shows up in the toolbox. How is a mystery to me. Anyway, all the rtf table and other code displays the way it should - thanks to your solution.

     

    The question now is: Why doesn't the C# design team upgrade the RTF reader to Word2007RTFSpec9 or something more up-to-date?

    Friday, December 05, 2008 9:03 PM
  • How do I put a certain value into a certain cell?
    Monday, September 28, 2009 9:58 PM
  • With this code, is it possible to add columns in a richtextbox?

    Greetings

    Monday, March 29, 2010 5:32 AM