zoukankan      html  css  js  c++  java
  • 修改NGUI 3.11 的控件 inputfileld hide input 属性bug

    1.勾选hideinput属性后,输入中文,会出现,无法显示的问题。

    2.勾选hideinput属性后,密码框会出现第一个字母被吃掉的问题

    解决方案:控件都不要勾选hideinput属性,代码做如下修改(绿色部分为修改后的代码)

    1.确保inputfield的label不是多行

    2.代码中强制打开hideinput

        string val;
                    TouchScreenKeyboardType kt;

                    if (inputShouldBeHidden)
                    {
                        TouchScreenKeyboard.hideInput = true;
                        kt = (TouchScreenKeyboardType)((int)keyboardType);
                        val = "|";
                    }
                    else if (inputType == InputType.Password)
                    {
                        TouchScreenKeyboard.hideInput = true;
                        kt = (TouchScreenKeyboardType)((int)keyboardType);
                        val = mValue;
                        mSelectionStart = mSelectionEnd;
                    }
                    else
                    {
                        TouchScreenKeyboard.hideInput = true;
                        kt = (TouchScreenKeyboardType)((int)keyboardType);
                        val = mValue;
                        mSelectionStart = mSelectionEnd;

    3.显示闪烁光标

    #if MOBILE
                //if (selected && (mKeyboard == null || inputShouldBeHidden))//deke old
                if (selected && (mKeyboard == null || true))//deke new
    #else
                if (selected)
    #endif

    这样修改后,不会显示屏幕键盘上面的小输入框。 输入一切正常

    deke 2017.3.18

  • 相关阅读:
    大量 TIME_WAIT 状态 TCP 连接,对业务有什么影响?怎么处理
    点击按钮保存当前页面为图片html2canvas
    浅谈webpack优化
    nginx配置
    table表格边框线问题
    git push到指定仓库
    No bean named 'xxx' is defined错误,原因及解决方案
    关于The requested list key 'map' could not be resolved as a collection/array/map/enumera...
    Tomcat网页加载过慢的排查调整time_wait连接过多
    MySQL information_schema 系统库
  • 原文地址:https://www.cnblogs.com/waterdragon/p/6573702.html
Copyright © 2011-2022 走看看