From f03ad3865548cae53bb4f1820e482d2ff4c4a20e Mon Sep 17 00:00:00 2001 From: John Date: Mon, 22 Oct 2012 18:37:20 +0000 Subject: [PATCH] =?UTF-8?q?bug=20fix=20BB2012-189=20=E2=80=93=20added=20lo?= =?UTF-8?q?gic=20for=20RNOWithAlt=20fixed=20width=20calculation=20For=20th?= =?UTF-8?q?e=20screen=20display,=20force=20the=20use=20of=20Letter=20Gothi?= =?UTF-8?q?c=20Tall=20when=20Letter=20Gothic=20is=20set.=20=20=20Some=20of?= =?UTF-8?q?=20the=20Letter=20Gothic=20characters=20have=20a=20different=20?= =?UTF-8?q?width=20whereas=20Letter=20Gothic=20Tall=20characters=20have=20?= =?UTF-8?q?a=20consistent=20width.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/Volian.Controls.Library/EditItem.cs | 10 +++++++++- PROMS/Volian.Controls.Library/RTBItem.cs | 3 ++- PROMS/Volian.Controls.Library/StepRTB.cs | 8 ++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index d797fccf..ee83dd14 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -2069,7 +2069,15 @@ namespace Volian.Controls.Library // the tab start & tab width to calculate the overall width. TabFormat = ""; // this is set so that TextWidth command below will be correct _IgnoreResize = true; - ContentWidth = _MyParentEditItem.ContentWidth; + // Use the RNOWidthAlt value if it exists instead of the default RNO width + // Note that I needed to add 1 to the ToDisplay() value to be closer to the needed + // width for the screen (this does not affect the printout) + string[] splitRNOWidthAlt = MyStepSectionLayoutData.RNOWidthAlt.Split(','); + int ovrRNOWidth = (RNOLevel < splitRNOWidthAlt.Length)?MyStepPanel.ToDisplay(float.Parse(splitRNOWidthAlt[RNOLevel])+1) : 0; + if (MyStepSectionLayoutData.RNOWidthAlt != null && ovrRNOWidth > 1) + ContentWidth = ovrRNOWidth; + else + ContentWidth =_MyParentEditItem.ContentWidth; _IgnoreResize = false; if (RNOLevel <= MyItemInfo.ColumnMode) { diff --git a/PROMS/Volian.Controls.Library/RTBItem.cs b/PROMS/Volian.Controls.Library/RTBItem.cs index b33acd05..9d8ace21 100644 --- a/PROMS/Volian.Controls.Library/RTBItem.cs +++ b/PROMS/Volian.Controls.Library/RTBItem.cs @@ -71,7 +71,8 @@ namespace Volian.Controls.Library get { return _MyStepRTB.Width; } set { - Width = value + lblTab.Left + lblTab.Width; + //Width = value + lblTab.Left + lblTab.Width; + Width = value + lblTab.Left + lblTab.Width + (this.Right - MyStepRTB.Right); } } public override int BorderWidth { get {return (_MyStepRTB.Width - _MyStepRTB.ClientRectangle.Width);} } diff --git a/PROMS/Volian.Controls.Library/StepRTB.cs b/PROMS/Volian.Controls.Library/StepRTB.cs index 3d3662cd..d75fb66f 100644 --- a/PROMS/Volian.Controls.Library/StepRTB.cs +++ b/PROMS/Volian.Controls.Library/StepRTB.cs @@ -378,6 +378,14 @@ namespace Volian.Controls.Library //Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format } } + // We found that the characters in the Letter Gothic font do not all use the same spacing. + // Also, the character spacing is even more different between screen resolutions. + // But the Letter Gothic font will print just fine. + // We also found that the Letter Gothic Tall font works just fine on the screen, the only difference + // is that the characters are a little bit taller. + // So we decided to use the Letter Gothic Tall font for the screen display any time that Letter Gothic is used. + if (_FormatFont.Name.ToUpper().Equals("LETTER GOTHIC")) + _FormatFont = new Font("Letter Gothic Tall", _FormatFont.Size, _FormatFont.Style); return _FormatFont; } set { _FormatFont = value; }