Farley RNO Column size improvements

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

View File

@@ -2087,9 +2087,12 @@ namespace Volian.Controls.Library
ItemLocation = new Point(_MyParentEditItem.ItemLocation.X, _MyParentEditItem.Bottom);
else if (MyItemInfo.MyParent.FormatStepData.Type == "TitleWithTextRight")
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
ItemLocation = new Point(_MyParentEditItem.ContentLeft, _MyParentEditItem.Bottom);
if (MyItemInfo.FormatStepData.ReadOnly)
{
Graphics g = CreateGraphics();
@@ -2103,6 +2106,8 @@ namespace Volian.Controls.Library
}
else if (MyParentEditItem != null && MyParentEditItem.MyItemInfo.FormatStepData.ReadOnly)
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
else if (MyItemInfo.MyTab.Offset != 0)
ContentWidth = _MyParentEditItem.ContentWidth;
else
ItemWidth = _MyParentEditItem.ContentWidth;
}
@@ -2117,9 +2122,10 @@ namespace Volian.Controls.Library
// 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)
// If in single column, don't make this adjustment:
string[] splitRNOWidthAlt = MyStepSectionLayoutData.RNOWidthAlt.Split(',');
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;
else
ContentWidth = _MyParentEditItem.ContentWidth;
@@ -2224,6 +2230,8 @@ namespace Volian.Controls.Library
}
else if (MyPreviousEditItem != null && MyPreviousEditItem.MyItemInfo.FormatStepData != null && MyPreviousEditItem.MyItemInfo.FormatStepData.ReadOnly)
ItemWidth = MyStepPanel.ToDisplay(MyStepSectionLayoutData.ColT) + MyStepPanel.ToDisplay(MyStepSectionLayoutData.WidSTableEdit, 0);
else if (MyItemInfo.MyTab.Offset != 0)
ContentWidth = MyPreviousEditItem.ContentWidth+10;
else
Width = MyPreviousEditItem.Width;