private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node == HotTrackNode) { e.Appearance.BackColor = Color.LightBlue; } }
private void TreeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.HasChildren) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } }
private void docTreeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.HasChildren && e.Column == colNAME) { e.Appearance.Font = prFont; //new Font(e.Appearance.Font, FontStyle.Bold); } }
//private void treeList_CustomDrawNodeCell(object sender, CustomDrawNodeCellEventArgs e) //{ // // Create brushes for cells. // Brush backBrush, foreBrush; // if (e.Node != (sender as TreeList).FocusedNode) // { // backBrush = new LinearGradientBrush(e.Bounds, Color.PapayaWhip, Color.PeachPuff, LinearGradientMode.ForwardDiagonal); // foreBrush = Brushes.Black; // } // else // { // backBrush = Brushes.DarkBlue; // foreBrush = new SolidBrush(Color.PeachPuff); // } // // Fill the background. // e.Graphics.FillRectangle(backBrush, e.Bounds); // // Paint the node value. // e.Graphics.DrawString(e.CellText, e.Appearance.Font, foreBrush, e.Bounds, // e.Appearance.GetStringFormat()); // // Prohibit default painting. // e.Handled = true; //} private void treeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { // Modify the appearance settings used to paint the "Budget" column's cells // whose values are greater than 500,000. if (e.Node != (sender as TreeList).FocusedNode) { if (e.Column.FieldName != "USE_YN") { return; } if (e.Node.GetValue(e.Column.AbsoluteIndex).ToString() == "N") { //e.Appearance.BackColor = Color.FromArgb(80, 255, 0, 255); e.Appearance.ForeColor = Color.Red; e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } else { //e.Appearance.BackColor = Color.FromArgb(80, 255, 0, 255); e.Appearance.ForeColor = Color.Empty; e.Appearance.Font = new Font(e.Appearance.Font, 0); } } }
private void treeListAPI_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { bool isFocusedNode = e.Node.TreeList.FocusedNode == e.Node; FontStyle fontStyle; switch (e.Column.AbsoluteIndex) { case 0: fontStyle = FontStyle.Regular; break; case 1: fontStyle = FontStyle.Regular | FontStyle.Italic; break; case 2: fontStyle = FontStyle.Regular | FontStyle.Italic; break; default: throw new NotImplementedException("Not coded yet."); } e.Appearance.BackColor = Slyce.Common.Colors.ChangeBrightness(Slyce.Common.Colors.BackgroundColor, 0.9); //Slyce.Common.Colors.FadingTitleLightColor;// Color.AliceBlue; e.Appearance.Font = new Font(e.Appearance.Font, fontStyle); if (e.Node.Focused) { SetFocusedNodeProperties(e); } }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.Selected) { //e.Appearance.BackColor = treeList1.Appearance.b } }
private void SetFocusedNodeProperties(GetCustomNodeCellStyleEventArgs e, bool isFocused) { if (isFocused) { e.Appearance.BackColor = Color.Red; } double brightness = Slyce.Common.Colors.GetBrightness(e.Appearance.BackColor); double lightBrightness = brightness > 0.5 ? brightness - 0.2 : brightness + 0.1; double darkBrightness = brightness > 0.5 ? brightness - 0.6 : brightness - 0.4; if (lightBrightness > 1) { lightBrightness = 1; } if (darkBrightness < 0) { darkBrightness = 0; } Color lightColor = Slyce.Common.Colors.ChangeBrightness(e.Appearance.BackColor, lightBrightness); Color darkColor = Slyce.Common.Colors.ChangeBrightness(e.Appearance.BackColor, darkBrightness); e.Appearance.ForeColor = Slyce.Common.Colors.IdealTextColor(darkColor);// Color.White; e.Appearance.BackColor = lightColor; e.Appearance.BackColor2 = darkColor; e.Appearance.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; e.Appearance.Options.UseBackColor = true; }
private void treeView_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.Tag is ProjectFolder) { e.Appearance.Font = boldFont; } }
private void treeListNodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node == HotTrackNode) { if (Global.Skin == "Black" || Global.Skin == "Blue" || Global.Skin == "Office 2007 Green") { e.Appearance.ForeColor = Color.White; e.Appearance.BackColor = Color.FromArgb(122, 150, 223); } else if (Global.Skin == "Foggy") { e.Appearance.ForeColor = Color.FromArgb(42, 44, 54); e.Appearance.BackColor = Color.FromArgb(234, 235, 241); } else if (Global.Skin == "Seven") { e.Appearance.ForeColor = Color.Black; e.Appearance.BackColor = Color.FromArgb(235, 235, 235); } else if (Global.Skin == "Darkroom") { e.Appearance.ForeColor = Color.FromArgb(220, 220, 220); e.Appearance.BackColor = Color.FromArgb(80, 80, 80); } } }
private void fList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (fBlock.Contains(e.Column.VisibleIndex, e.Node.Id)) { e.Appearance.BackColor = SystemColors.Highlight; } }
/// <summary> /// Handles the NodeCellStyle event of the treeDepartment control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e"> /// The <see cref="DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs" /> instance containing the /// event data. /// </param> private void treeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { e.Column.ShowButtonMode = ShowButtonModeEnum.ShowOnlyInEditor; e.Appearance.Font = e.Node.HasChildren ? new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, FontStyle.Bold) : new Font(e.Appearance.Font.FontFamily, e.Appearance.Font.Size, FontStyle.Regular); }
private void TreeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node == HotTrackNode) { e.Appearance.Assign(AppearanceHighlight); } }
private void OnTreeListNodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (!e.Node.HasChildren) { return; } e.Appearance.BackColor = GetColorByLevel(e.Node.Level); }
private void treeData_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { //if (_isStyle) return; decimal percentVT = TextUtils.ToDecimal(e.Node.GetValue(colPercentVT)); decimal qty = TextUtils.ToDecimal(e.Node.GetValue(colQty)); if (e.Column == colPercentExport || e.Column == colPercentVT) { decimal percentExport = TextUtils.ToDecimal(e.Node.GetValue(colPercentExport)); if (percentVT >= 100 && percentExport >= 100) { e.Appearance.BackColor = Color.GreenYellow; } if (percentVT >= 100 && percentExport < 100) { e.Appearance.BackColor = Color.Yellow; } //if (percentVT == 0 && qty == 0) //{ // e.Appearance.BackColor = Color.MediumTurquoise; //} } if (e.Column == colDateAboutE && percentVT < 100) { if (qty == 0) { return; } if (TextUtils.ToDate3(e.Node.GetValue(colDateAboutE)).Date > TextUtils.ToDate3(dtpSXLRDeadline.EditValue).Date) { e.Appearance.BackColor = Color.Red; } else { if (TextUtils.ToInt(e.Node.GetValue(colTotalDateAboutENull)) > 0) { e.Appearance.BackColor = Color.Orange; } } } if (e.Column == colIN || e.Column == colCNC || e.Column == colPCB || e.Column == colGCAL || e.Column == colLR) { string date = TextUtils.ToString(e.Node.GetValue(e.Column)); if (date.Contains("-")) { DateTime dateDK = TextUtils.ToDate(date); if (DateTime.Now.Date > dateDK.Date) { e.Appearance.BackColor = Color.Red; } } } //_isStyle = true; }
/// <summary> /// 完成的任务加入删除线 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnNodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { Models.ys_StaffTasks task = treeList1.GetRow(e.Node.Id) as Models.ys_StaffTasks; if (task == null || !task.IsCompleted) { return; } e.Appearance.FontStyleDelta = (FontStyle.Italic | FontStyle.Strikeout); }
private static void TreeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { var gridView = sender as TreeList; if (e.Node.Focused == true) { e.Appearance.BackColor = gridView.Appearance.FocusedRow.BackColor; } }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.Focused) { e.Appearance.ForeColor = Color.White; e.Appearance.BackColor = Color.Black; // e.Appearance.Font.Bold = true; } }
private void treeList7_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { int treeListIndex = e.Node.Id; if (hashTreeListBackColor[3].Contains(treeListIndex)) { e.Appearance.BackColor = Color.Yellow; } }
void Grid_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.Checked) { e.Appearance.BackColor = SelectedColor; //e.Appearance.ForeColor = Color.Green; e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Column.FieldName == "ITEM_DESC1") { if (e.Node.Level == 0 || e.Node.HasChildren) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } } }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { int treeListIndex = e.Node.Id; if (hashTreeListBackColor[0].Contains(treeListIndex)) { e.Appearance.BackColor = Color.LightPink; e.Appearance.ForeColor = Color.DarkGreen; } }
private void treeListMenu_x_Usuario_x_Empresa_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { try { event_treeListMenu_x_Usuario_x_Empresa_NodeCellStyle(sender, e); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.Level == 0) { e.Appearance.ForeColor = Color.Green; } else if (e.Node.Level == 1) { e.Appearance.ForeColor = Color.Red; } }
private void storeLoadTree_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.Level < 2) { if (e.Column == fullWeightCol || e.Column == currentWeightCol || e.Column == remainsWeightCol) { e.Appearance.ForeColor = Color.Navy; e.Appearance.Font = new Font("Tahoma", 9, FontStyle.Bold); } } }
private void OnNodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (columnFilterConditions.Count == 0) { return; } if (filteredVisibleNodes.Contains(e.Node) && !e.Node.Selected) { e.Appearance.BackColor = Color.LightGray; } }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node.HasChildren) { // --if (e.Node.Id % 2 == 0) e.Appearance.BackColor = Color.FromArgb(233, 255, 201); //Color.FromArgb(228, 250, 185); } else { e.Appearance.Font = new Font("Calibri", 18, FontStyle.Regular); } // else // e.Appearance.BackColor = Color.FromArgb(228, 250, 185); }
private void TreeItems_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { //if (e.Node.Checked) // e.Appearance.BackColor = Color.Green; if (Convert.ToString(e.Node["isDelete"]) == "True") { e.Appearance.BackColor = Color.Red; e.Appearance.Font = new Font(TreeItems.Appearance.OddRow.Font, FontStyle.Strikeout); } //else if (Convert.ToString(e.Node["IsAmber"]) == "True") //{ e.Appearance.BackColor = Color.Orange; } //else if (Convert.ToString(e.Node["IsRed"]) == "True") //{ e.Appearance.BackColor = Color.Red; } }
private void treeListAPIHelper_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { bool isFocusedNode = e.Node.TreeList.FocusedNode == e.Node; bool hasActualDefaultFunction = false; FontStyle fontStyle; switch (e.Column.AbsoluteIndex) { case 0: fontStyle = FontStyle.Regular; break; case 1: string val = (string)e.Node.GetValue(1); if (Project.Instance.FindDefaultValueFunction(val) != null || Project.Instance.FindFunction(val) != null) { hasActualDefaultFunction = true; fontStyle = FontStyle.Italic | FontStyle.Bold; e.Appearance.BackColor = Slyce.Common.Colors.ChangeBrightness(Slyce.Common.Colors.BackgroundColor, 0.9); SetFocusedNodeProperties(e, false); } else { fontStyle = FontStyle.Italic; } break; default: throw new NotImplementedException("Not coded yet."); } if (hasActualDefaultFunction) { //e.Appearance.BackColor = Slyce.Common.Colors.ChangeBrightness(Slyce.Common.Colors.BackgroundColor, 0.9); //Slyce.Common.Colors.FadingTitleLightColor;// Color.AliceBlue; if (e.Node == treeListAPIHelper.FocusedNode && e.Column.AbsoluteIndex == treeListAPIHelper.FocusedColumn.AbsoluteIndex) { e.Appearance.BackColor = Slyce.Common.Colors.ChangeBrightness(Slyce.Common.Colors.BackgroundColor, 0.9); } } //e.Appearance.BackColor = Slyce.Common.Colors.ChangeBrightness(Slyce.Common.Colors.BackgroundColor, 0.9); //Slyce.Common.Colors.FadingTitleLightColor;// Color.AliceBlue; e.Appearance.Font = new Font(e.Appearance.Font, fontStyle); if (e.Node.Focused && e.Column.AbsoluteIndex == treeListAPIHelper.FocusedColumn.AbsoluteIndex) { if (e.Column.AbsoluteIndex != 0) { SetFocusedNodeProperties(e, true); } } }
private void nodeCellStyleEvent(object sender, GetCustomNodeCellStyleEventArgs e) { var node = NodeFrom(e.Node); if (node == null) { return; } if (node.ForeColor == Color.Empty) { return; } e.Appearance.ForeColor = node.ForeColor; }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Column.FieldName == "ITEM_DESC1") { if (e.Node.Level == 0 || e.Node.HasChildren) { e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } if (Convert.ToBoolean(e.Node.GetValue(colREQUIRE_ENTRY))) { e.Appearance.ForeColor = Color.Red; } } }
private void historyTreeListNodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node == null) { return; } var historyItemId = historyItemIdFrom(e.Node); if (_presenter.IsLabel(historyItemId)) { e.Appearance.BackColor = _historyBrowserConfiguration.LabelColor; } else if (!_presenter.CanRollBackTo(historyItemId)) { e.Appearance.BackColor = _historyBrowserConfiguration.NotReversibleColor; } }
void treeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { var treelist = sender as TreeList; if (List.ContainsKey(treelist)) { var para = List[treelist]; if (e.Node == para.HotTrackNode) e.Appearance.BackColor = para.HotTrackColor; } }
private void tlDarwings_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { var data = (Drawing) tlDarwings.GetDataRecordByNode(e.Node); if (e.Node != tlDarwings.FocusedNode) { if (cbUseRowColor.Checked) { if (data != null) e.Appearance.BackColor = data.ColorDrawing; if (e.Column.OptionsColumn.ReadOnly) { e.Appearance.BackColor = Color.LightCyan; e.Appearance.BackColor2 = Color.LightCyan; } } else { if (e.Column.OptionsColumn.ReadOnly) { e.Appearance.BackColor = Color.LightCyan; e.Appearance.BackColor2 = Color.LightCyan; } } if (cbInSSI.Checked && data != null) { if (_standartDrawings.Any(x => x.Equals(data))) { e.Appearance.BackColor = Color.Bisque; e.Appearance.BackColor2 = Color.Bisque; } } if (data?.Version != null) { if (data.Version.CheckPointTime > _minDate) { if (data.Version.LastChangeTime > data.Version.CheckPointTime) { e.Appearance.BackColor = Color.FromArgb(255, 192, 0); e.Appearance.BackColor2 = Color.FromArgb(255, 192, 0); } } } } else { } if (tlDarwings.OptionsBehavior.Editable) { } var parent = e.Node.ParentNode; var level = 0; while (parent != null) { parent = parent.ParentNode; level++; if (level > 2) break; } if (level > 2) level = 2; e.Appearance.FontSizeDelta = -level; if (e.Node.HasChildren) { e.Appearance.FontStyleDelta = FontStyle.Bold; e.Appearance.FontSizeDelta = -level; } }
private void staffList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { //if (e.Node.GetValue(2) != null) //{ // e.Appearance.BackColor = Color.LightGreen; //} }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Node == HotTrackNode) e.Appearance.BackColor = Color.FromArgb(242, 144, 22); }
private void SetFocusedNodeProperties(GetCustomNodeCellStyleEventArgs e) { e.Appearance.ForeColor = Slyce.Common.Colors.IdealTextColor(e.Appearance.BackColor); //double brightness = Slyce.Common.Colors.GetBrightness(e.Appearance.BackColor); //double lightBrightness = brightness > 0.5 ? brightness - 0.2 : brightness + 0.1; //double darkBrightness = brightness > 0.5 ? brightness - 0.6 : brightness - 0.4; //if (lightBrightness > 1) { lightBrightness = 1; } //if (darkBrightness < 0) { darkBrightness = 0; } //Color lightColor = Slyce.Common.Colors.ChangeBrightness(e.Appearance.BackColor, lightBrightness); //Color darkColor = Slyce.Common.Colors.ChangeBrightness(e.Appearance.BackColor, darkBrightness); //e.Appearance.ForeColor = Slyce.Common.Colors.IdealTextColor(darkColor);// Color.White; //e.Appearance.BackColor = lightColor; //e.Appearance.BackColor2 = darkColor; //e.Appearance.GradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; //e.Appearance.Options.UseBackColor = true; }
private void treeList1_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { Type nodeType = e.Node.Tag.GetType(); if (e.Node.StateImageIndex == 0) { e.Appearance.BackColor = Color.White; } else { e.Appearance.BackColor = Color.GreenYellow; e.Appearance.ForeColor = Slyce.Common.Colors.IdealTextColor(e.Appearance.BackColor); } if (e.Node.Focused) { SetFocusedNodeProperties(e); } }
private void treeList2_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { if (e.Column.FieldName != "DisplayName") return; Fwk.UI.Controls.Menu.Tree.MenuItem m = (Fwk.UI.Controls.Menu.Tree.MenuItem)treeList2.GetDataRecordByNode(e.Node); if (String.IsNullOrEmpty(m.AuthorizationRuleName)) return; if (!FormBase.CheckRule(m.AuthorizationRuleName)) { //e.Appearance.BackColor = Color.FromArgb(80, 255, 0, 255); e.Appearance.ForeColor = Color.Gray; //e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); } }
private void TreeList_NodeCellStyle(object sender, GetCustomNodeCellStyleEventArgs e) { // bool isNode = Convert.ToBoolean(e.Node.GetValue("IsNode")); // if (isNode == false) // e.Appearance.Font = new Font(e.Appearance.Font, FontStyle.Bold); }