• 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;
                }
            }
        }

  • 相关阅读:
    由铭心提供的免费邮箱
    BT面板安装教程
    Onedrive分享型网盘搭建
    cookie与session
    IntelliJ Idea 2017 免费激活方法
    什么情况下出现的redis
    tomcat编码问题
    idea启动项目报Unable to open debugger port (127.0.0.1:11480): java.net.SocketException "socket closed"
    Sentry异常捕获平台
    亚瑟·阿伦博士的36个问题
  • 原文地址:https://www.cnblogs.com/luoyaoquan/p/2144202.html
Copyright © 2020-2023  润新知