duheng
2025-03-28 9be9ba4e159969fb5e32648c2c34e912ccc3ae6d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
namespace Yw.WinFrmUI
{
    /// <summary>
    /// 
    /// </summary>
    public static class TokenEditExtensions
    {
        /// <summary>
        /// 初始化默认设置
        /// </summary>
        public static void InitDefaultSettings(this TokenEdit rhs, char separatorChar = ',')
        {
            rhs.Properties.ShowDropDown = true;
            rhs.Properties.DropDownRowCount = 5;
            rhs.Properties.CheckMode = TokenEditCheckMode.Default;
            rhs.Properties.MaxExpandLines = 5;
            rhs.Properties.PopupPanelOptions.ShowPopupPanel = true;
            rhs.Properties.PopupPanelOptions.Location = TokenEditPopupPanelLocation.BelowToken;
            rhs.Properties.ShowRemoveTokenButtons = false;
            rhs.Properties.PopupSizeable = false;
            rhs.Properties.TokenGlyphLocation = TokenEditGlyphLocation.Left;
            rhs.Properties.EditValueSeparatorChar = separatorChar;
            rhs.Properties.AutoHeightMode = TokenEditAutoHeightMode.RestrictedExpand;
            rhs.ShowPopup();
        }
    }
}