陈嘉乐
2021-04-01 802f200c004348defca5cefd047ad843c74abadd
HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs
@@ -360,13 +360,18 @@
        /// <summary>
        /// 根据文本,计算它需要的总行数
        /// </summary>
        /// <param name="i_width">当值为-1时,需要父控件,真实值</param>
        /// <returns></returns>
        public int GetRealRowCountByText()
        public int GetRealRowCountByText(int i_width = -1)
        {
            if (i_width == -1)
            {
                i_width = this.Width;
            }
            //先获取它的真实宽度
            int realWidth = this.GetRealWidthByText();
            int row = realWidth / this.Width;
            if (realWidth % this.Width > 0)
            int row = realWidth / i_width;
            if (realWidth % i_width > 0)
            {
                row++;
            }