diff --git a/PROMS/Volian.Controls.Library/StepItem.cs b/PROMS/Volian.Controls.Library/StepItem.cs index d69b8cc9..9bd1ac45 100644 --- a/PROMS/Volian.Controls.Library/StepItem.cs +++ b/PROMS/Volian.Controls.Library/StepItem.cs @@ -424,7 +424,7 @@ namespace Volian.Controls.Library ItemInfo.ResetTabString(MyID); string tabString = _MyItemInfo.MyTab.CleanText; lblTab.Text = tabString; - lblTab.Width = tabString.Length * 8; + lblTab.Width = tabString.Length * 8 * MyStepPanel.DPI / 96;// Adjust width for DPI Invalidate(); _MyStepRTB.Left = lblTab.Left + lblTab.Width;// +2; _MyStepRTB.Width = Width - _MyStepRTB.Left; diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 17ee92be..83d7b63b 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -233,7 +233,23 @@ namespace Volian.Controls.Library ReadOnly = !(EpMode == E_EditPrintMode.Edit && VwMode == E_ViewMode.Edit); if (!ReadOnly && !edit) ReadOnly = true; ClearUndo(); - RightMargin = Width; + // RHM: 20101122 - Not sure why the RightMargin is set. The following line was added in Rev 23 + // in May of 2008. + // + // RightMargin = Width; + // + // Normally a the Right Margin is handled by the RichTextBox it defaults to a value of 0. + // + // If the RightMargin is equal to the width of the RichTextBox the word-wrap occurs just beyond + // the visible extent (right edge) of the RichTextBox when it is in view mode. In edit mode it + // wraps within the visible extent. An example of this is Step 24 of ES02 in HLP EOPs. + // + // If the RightMargin is greater than the width of the RichTextBox, the word-wrap occurs beyond + // the visible extent of the RichTextBox for both view and edit modes. + // + // Setting the RightMargin to the Width minus one, accounts for the slight indent (1 pixel) of + // the text within the RichTextBox. + RightMargin = Width - 1; // figure out if needs outlined, depends on table/figure type if (!edit) {