This commit is contained in:
parent
2bf3fc3844
commit
78dd08720a
@ -125,10 +125,22 @@ namespace Volian.Controls.Library
|
|||||||
|
|
||||||
#region Grid and Cell Styles
|
#region Grid and Cell Styles
|
||||||
|
|
||||||
public void CellBackgroundYellow()
|
//public void CellBackgroundYellow()
|
||||||
|
//{
|
||||||
|
// CellRange cr = this.Selection;
|
||||||
|
// cr.Style = this.Styles["Yellow"];
|
||||||
|
//}
|
||||||
|
|
||||||
|
public void ChangeBackgroundColor(string bckgndColor)
|
||||||
{
|
{
|
||||||
CellRange cr = this.Selection;
|
CellRange cr = this.Selection;
|
||||||
cr.Style = this.Styles["Yellow"];
|
string stylename = string.Format("R{0}C{1}Style", cr.r1, cr.c1);
|
||||||
|
if (!bckgndColor.EndsWith(";"))
|
||||||
|
bckgndColor+=";";
|
||||||
|
string strBckgndColor = string.Format("BackColor:{0}", bckgndColor);
|
||||||
|
CellStyle cs = this.Styles.Add(stylename, cr.Style);
|
||||||
|
cs.ParseString(strBckgndColor);
|
||||||
|
cr.Style = cs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ToggleCellTextAlignment()
|
public void ToggleCellTextAlignment()
|
||||||
@ -232,31 +244,31 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
CellStyle cs;
|
CellStyle cs;
|
||||||
|
|
||||||
cs = this.Styles.Add("Dotted");
|
//cs = this.Styles.Add("Dotted");
|
||||||
cs.Border.Style = BorderStyleEnum.Dotted;
|
//cs.Border.Style = BorderStyleEnum.Dotted;
|
||||||
cs = this.Styles.Add("Double");
|
//cs = this.Styles.Add("Double");
|
||||||
cs.Border.Style = BorderStyleEnum.Double;
|
//cs.Border.Style = BorderStyleEnum.Double;
|
||||||
cs = this.Styles.Add("Fillet");
|
//cs = this.Styles.Add("Fillet");
|
||||||
cs.Border.Style = BorderStyleEnum.Fillet;
|
//cs.Border.Style = BorderStyleEnum.Fillet;
|
||||||
cs = this.Styles.Add("Flat");
|
//cs = this.Styles.Add("Flat");
|
||||||
cs.Border.Style = BorderStyleEnum.Flat;
|
//cs.Border.Style = BorderStyleEnum.Flat;
|
||||||
cs = this.Styles.Add("Groove");
|
//cs = this.Styles.Add("Groove");
|
||||||
cs.Border.Style = BorderStyleEnum.Groove;
|
//cs.Border.Style = BorderStyleEnum.Groove;
|
||||||
cs = this.Styles.Add("Inset");
|
//cs = this.Styles.Add("Inset");
|
||||||
cs.Border.Style = BorderStyleEnum.Inset;
|
//cs.Border.Style = BorderStyleEnum.Inset;
|
||||||
cs = this.Styles.Add("None");
|
//cs = this.Styles.Add("None");
|
||||||
cs.Border.Style = BorderStyleEnum.None;
|
//cs.Border.Style = BorderStyleEnum.None;
|
||||||
cs = this.Styles.Add("Raised");
|
//cs = this.Styles.Add("Raised");
|
||||||
cs.Border.Style = BorderStyleEnum.Raised;
|
//cs.Border.Style = BorderStyleEnum.Raised;
|
||||||
cs = this.Styles.Add("CenterRight");
|
//cs = this.Styles.Add("CenterRight");
|
||||||
cs.TextAlign = TextAlignEnum.RightCenter; //.LeftCenter; // this is being ignored - probably due to RTF conversion
|
//cs.TextAlign = TextAlignEnum.RightCenter; //.LeftCenter; // this is being ignored - probably due to RTF conversion
|
||||||
cs = this.Styles.Add("Yellow");
|
//cs = this.Styles.Add("Yellow");
|
||||||
cs.BackColor = Color.Yellow;
|
//cs.BackColor = Color.Yellow;
|
||||||
cs = this.Styles.Add("Margins");
|
//cs = this.Styles.Add("Margins");
|
||||||
cs.Margins.Bottom = 5;
|
//cs.Margins.Bottom = 5;
|
||||||
cs.Margins.Top = 10;
|
//cs.Margins.Top = 10;
|
||||||
cs.Margins.Left = 15;
|
//cs.Margins.Left = 15;
|
||||||
cs.Margins.Right = 20;
|
//cs.Margins.Right = 20;
|
||||||
}
|
}
|
||||||
#endregion //Grid and Cell Styles
|
#endregion //Grid and Cell Styles
|
||||||
|
|
||||||
@ -1568,6 +1580,7 @@ namespace Volian.Controls.Library
|
|||||||
Bounds = rc;
|
Bounds = rc;
|
||||||
// initialize control content
|
// initialize control content
|
||||||
Text = "";
|
Text = "";
|
||||||
|
FindAllLinks(); // jsj 1-5-2011
|
||||||
if (_pendingKey > ' ')
|
if (_pendingKey > ' ')
|
||||||
Text = _pendingKey.ToString();
|
Text = _pendingKey.ToString();
|
||||||
else if (_owner[row, col] != null)
|
else if (_owner[row, col] != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user