Farley RNO Column size improvements

This commit is contained in:
Kathy Ruffing 2013-12-04 12:59:13 +00:00
parent eecf225006
commit d088933be0
2 changed files with 18 additions and 6 deletions

View File

@ -2087,6 +2087,9 @@ namespace Volian.Controls.Library
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom); ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom);
else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextRight") else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextRight")
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + _MyParentEditItem.ItemWidth, _MyParentEditItem.ItemLocation.Y); ItemLocation = new Point(_MyParentEditItem.ItemLocation.X + _MyParentEditItem.ItemWidth, _MyParentEditItem.ItemLocation.Y);
else if (MyItemInfo.MyTab.Offset != 0)
ContentLocation = new Point(_MyParentEditItem.ContentLocation.X+10, _MyParentEditItem.Bottom);
//ItemLocation = new Point(_MyParentEditItem.ItemLocation.X+10, _MyParentEditItem.Bottom);
else else
ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom); ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom);
@ -2103,6 +2106,8 @@ namespace Volian.Controls.Library
} }
else if (MyParentEditItem != null && MyParentEditItem.MyItemInfo.FormatStepData.ReadOnly) else if (MyParentEditItem != null && MyParentEditItem.MyItemInfo.FormatStepData.ReadOnly)
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0); ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
else if (MyItemInfo.MyTab.Offset != 0)
ContentWidth = _MyParentEditItem.ContentWidth;
else else
ItemWidth = _MyParentEditItem.ContentWidth; ItemWidth = _MyParentEditItem.ContentWidth;
} }
@ -2117,9 +2122,10 @@ namespace Volian.Controls.Library
// Use the RNOWidthAlt value if it exists instead of the default RNO width // 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 // 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) // width for the screen (this does not affect the printout)
// If in single column, don't make this adjustment:
string[] splitRNOWidthAlt = MyStepSectionLayoutData.RNOWidthAlt.Split(','); string[] splitRNOWidthAlt = MyStepSectionLayoutData.RNOWidthAlt.Split(',');
int ovrRNOWidth = (RNOLevel < splitRNOWidthAlt.Length)?MyStepPanel.ToDisplay(float.Parse(splitRNOWidthAlt[RNOLevel])+1) : 0; int ovrRNOWidth = (RNOLevel < splitRNOWidthAlt.Length)?MyStepPanel.ToDisplay(float.Parse(splitRNOWidthAlt[RNOLevel])+1) : 0;
if (MyStepSectionLayoutData.RNOWidthAlt != null && ovrRNOWidth > 1) if (MyStepSectionLayoutData.RNOWidthAlt != null && ovrRNOWidth > 1 && MyItemInfo.ColumnMode != 0)
ContentWidth = ovrRNOWidth; ContentWidth = ovrRNOWidth;
else else
ContentWidth = _MyParentEditItem.ContentWidth; ContentWidth = _MyParentEditItem.ContentWidth;
@ -2224,6 +2230,8 @@ namespace Volian.Controls.Library
} }
else if (MyPreviousEditItem != null && MyPreviousEditItem.MyItemInfo.FormatStepData != null && MyPreviousEditItem.MyItemInfo.FormatStepData.ReadOnly) else if (MyPreviousEditItem != null && MyPreviousEditItem.MyItemInfo.FormatStepData != null && MyPreviousEditItem.MyItemInfo.FormatStepData.ReadOnly)
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0); ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
else if (MyItemInfo.MyTab.Offset != 0)
ContentWidth = MyPreviousEditItem.ContentWidth+10;
else else
Width = MyPreviousEditItem.Width; Width = MyPreviousEditItem.Width;

View File

@ -71,8 +71,9 @@ namespace Volian.Controls.Library
get { return _MyStepRTB.Width; } get { return _MyStepRTB.Width; }
set set
{ {
//Width = value + lblTab.Left + lblTab.Width; // This is wrong for single column (KBR) - RHM Debug:
Width = value + lblTab.Left + lblTab.Width + (this.Right - MyStepRTB.Right); //MyStepRTB.Width = value;
Width = value + lblTab.Left + lblTab.Width + (this.Width - MyStepRTB.Right);
} }
} }
public override int BorderWidth { get { return (_MyStepRTB.Width - _MyStepRTB.ClientRectangle.Width); } } public override int BorderWidth { get { return (_MyStepRTB.Width - _MyStepRTB.ClientRectangle.Width); } }
@ -164,8 +165,11 @@ namespace Volian.Controls.Library
bool lastDigitSingle = Regex.IsMatch(tabString, "^.*[^0-9][0-9] *$"); bool lastDigitSingle = Regex.IsMatch(tabString, "^.*[^0-9][0-9] *$");
lblTab.Width = ((lastDigitSingle ? 1 : 0) + tabString.Length) * MyStepPanel.DPI / cpi; lblTab.Width = ((lastDigitSingle ? 1 : 0) + tabString.Length) * MyStepPanel.DPI / cpi;
Invalidate(); Invalidate();
if (MyItemInfo.MyTab.Offset == 0)
{
_MyStepRTB.Left = lblTab.Left + lblTab.Width; _MyStepRTB.Left = lblTab.Left + lblTab.Width;
_MyStepRTB.Width = Width - _MyStepRTB.Left - RTBMargin - CheckOffMargin; _MyStepRTB.Width = Width - _MyStepRTB.Left - RTBMargin - CheckOffMargin;
}
_TabFormat = value; _TabFormat = value;
} }
} }