Initialize BorderListBox based upon current DPI

Changed background for border selection
Draw Background and Borders for empty cells
Set the Borders druing Grid conversion
This commit is contained in:
Rich
2011-03-21 16:33:29 +00:00
parent f36d16d84c
commit ec9932d93e
4 changed files with 84 additions and 51 deletions

View File

@@ -163,6 +163,8 @@ namespace Volian.Controls.Library
{
if (MyFlexGrid.Selection.c1 < 0 || MyFlexGrid.Selection.r1 < 0)
return;
if (MyFlexGrid.Selection.c1 >= MyFlexGrid.Cols.Count-1 || MyFlexGrid.Selection.r1 >= MyFlexGrid.Rows.Count-1)
return;
C1.Win.C1FlexGrid.CellRange cr = MyFlexGrid.GetEvenSelection();
rbnBorderSelectionPanel.InitializeBorder(MyFlexGrid.MyBorders, cr.r1, cr.c1, cr.r2, cr.c2);
}
@@ -288,6 +290,8 @@ namespace Volian.Controls.Library
// Note: the QAT menu is to the right of the V start button in the upper left
_RibbonControl.AutoExpand = false;
_RibbonControl.Items[0].RaiseClick(); // initially default to HOME tab
rbnBorderlistBox.Resize+=new EventHandler(rbnBorderlistBox_Resize);
rbnBorderlistBox.SetupFontAndSize(6); // 6 Point Font
}
void _RibbonControl_SizeChanged(object sender, EventArgs e)
@@ -1891,26 +1895,25 @@ namespace Volian.Controls.Library
MyEditItem.Invalidate();
MyFlexGrid.Invalidate();
}
private void btnTblNoBorder_Click(object sender, EventArgs e)
{
rbnBorderSelectionPanel.AllBorders = GridLinePattern.None;
}
private void btnTblOutline_Click(object sender, EventArgs e)
{
rbnBorderSelectionPanel.OutlineBorder = rbnBorderlistBox.SelectedLinePattern;
}
private void btnTblInside_Click(object sender, EventArgs e)
{
rbnBorderSelectionPanel.InsideBorders = rbnBorderlistBox.SelectedLinePattern;
}
private void rbnBorderlistBox_Resize(object sender, EventArgs e)
{
rbnBorderSelectionPanel.Size = rbnBorderlistBox.Size;
_RibbonControl.Height = rbnBorderlistBox.Height + _RibbonControl.Height - _RibbonControl.ClientSize.Height;
//_RibbonControl.Height = rbnBorderlistBox.Height + _RibbonControl.Height - _RibbonControl.ClientSize.Height;
}
}
public enum E_FieldToEdit { StepText, Text, Number };
public class StepTabRibbonEventArgs : EventArgs
{