Exemple #1
0
        /// <summary>
        /// Sets the minimum (and preferred) width of this combo box in characters.
        ///
        /// The width is computed using the currently selected text style.
        /// </summary>
        /// <param name="chars">The number of characters to be displayed.</param>
        /// <returns>This combo box for call chaining.</returns>
        public PComboBox <T> SetMinWidthInCharacters(int chars)
        {
            int width = Mathf.RoundToInt(chars * PUIUtils.GetEmWidth(TextStyle));

            if (width > 0)
            {
                MinWidth = width;
            }
            return(this);
        }