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