wxr
2021-03-30 aa8a3dcb1cb921c9f721aac4c9c87c696ce8a354
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++;
            }