zoukankan      html  css  js  c++  java
  • dev EditMask 设置方法

    官方帮助地址:

    https://documentation.devexpress.com/WindowsForms/583/Controls-and-Libraries/Editors-and-Simple-Controls/Simple-Editors/Concepts/Masks/Mask-Editors-Overview

    代码实例:

                RepositoryItemTextEdit repositoryItemTextEdit1 = new RepositoryItemTextEdit();
                repositoryItemTextEdit1.Mask.EditMask = "\d{0,}\.[0,5]|\d{0,}";
                repositoryItemTextEdit1.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;

    Dev控件之GridControl行色变化  

    //1、隔行换色,在fromLoad中以下代码
    gridView1.Appearance.EvenRow.BackColor = Color.FromArgb(150, 254, 253, 236);
    gridView1.Appearance.OddRow.BackColor = Color.FromArgb(150, 240, 236, 253);
    gridView1.Appearance.SelectedRow.BackColor = Color.FromArgb(100, 207, 255, 220);
    gridView1.OptionsView.EnableAppearanceEvenRow = true;
    gridView1.OptionsView.EnableAppearanceOddRow = true;
    //2、按条件换色
    
    string sCol = "";           //列值
    bool bColor = true;      //当前色
     private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
     {
                GridView View = sender as GridView;
                if (e.RowHandle >= 0)
                {
                    string c1 = View.GetRowCellDisplayText(e.RowHandle, View.Columns["c2"]);
                    if (c1 != sCol)
                    {
                        bColor = !bColor;
                        sCol = c1;
                    }
                    if (bColor)
                    {
                        e.Appearance.BackColor = Color.Salmon;
                        e.Appearance.BackColor2 = Color.SeaShell;
                    }
                    else
                    {                  
                       e.Appearance.BackColor = Color.Gold;
                       e.Appearance.BackColor2 = Color.LightGoldenrodYellow;
                    }        
               }                        
    }
  • 相关阅读:
    如何在当前文件夹打开cmd(基于win10)
    Python命名空间和作用域
    Python定位模块_PYTHONPATH变量
    Python模块_import语句_from...import 函数名_from ... import *
    Python全局变量和局部变量
    Python变量作用域
    Python匿名函数_return语句
    Python函数参数
    Python按值传递参数和按引用传递参数
    Python函数调用
  • 原文地址:https://www.cnblogs.com/lhyqzx/p/7503184.html
Copyright © 2011-2022 走看看