Farley RNO Column size improvements
This commit is contained in:
parent
eecf225006
commit
d088933be0
@ -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;
|
||||
|
||||
|
@ -71,8 +71,9 @@ namespace Volian.Controls.Library
|
||||
get { return _MyStepRTB.Width; }
|
||||
set
|
||||
{
|
||||
//Width = value + lblTab.Left + lblTab.Width;
|
||||
Width = value + lblTab.Left + lblTab.Width + (this.Right - MyStepRTB.Right);
|
||||
// This is wrong for single column (KBR) - RHM Debug:
|
||||
//MyStepRTB.Width = value;
|
||||
Width = value + lblTab.Left + lblTab.Width + (this.Width - MyStepRTB.Right);
|
||||
}
|
||||
}
|
||||
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] *$");
|
||||
lblTab.Width = ((lastDigitSingle ? 1 : 0) + tabString.Length) * MyStepPanel.DPI / cpi;
|
||||
Invalidate();
|
||||
_MyStepRTB.Left = lblTab.Left + lblTab.Width;
|
||||
_MyStepRTB.Width = Width - _MyStepRTB.Left - RTBMargin - CheckOffMargin;
|
||||
if (MyItemInfo.MyTab.Offset == 0)
|
||||
{
|
||||
_MyStepRTB.Left = lblTab.Left + lblTab.Width;
|
||||
_MyStepRTB.Width = Width - _MyStepRTB.Left - RTBMargin - CheckOffMargin;
|
||||
}
|
||||
_TabFormat = value;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user