zoukankan      html  css  js  c++  java
  • UpperCase for ALL Text Editors

    FROM:

    http://community.devexpress.com/forums/p/62366/211324.aspx

    Hi,

    Does anyone know of an easy way to enforce upper case for ALL text editors in code?

    Regards

    Dennis

    ==================================

    Too late? 

    This code will work for WindowsForms only...

        public partial class UpperCaseViewController : ViewController
        {
            public UpperCaseViewController()
            {
                InitializeComponent();
                RegisterActions(components);
            }

            protected override void OnActivated()
            {
                base.OnActivated();
                View.ControlsCreated += new EventHandler(View_ControlsCreated);
            }

            void View_ControlsCreated(object sender, EventArgs e)
            {
                if (View is DetailView)
                {
                    foreach (DetailViewItem editor in (View as DetailView).Items)
                        if (editor.Control is TextEdit)
                            (editor.Control as TextEdit).Properties.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
                }
            }
        }

  • 相关阅读:
    第 13 章 外观模式
    第 12 章 桥接模式
    第 10 章 适配器模式
    第 7 章 原型模式
    PHP的预处理语句的使用
    PHP的异常处理
    PHP中PDO函数的使用
    PHP的PDO模式数据操作
    PHP的 Final关键字、类(文件)的加载和命名空间
    PHP的魔术常量和魔术方法
  • 原文地址:https://www.cnblogs.com/luoyaoquan/p/2144202.html
Copyright © 2011-2022 走看看