Example #1
0
        /// <summary>
        /// Sets the text to the given StringBuilder value.
        /// Layouts the controls.
        /// </summary>
        /// <param name="value"></param>
        public void RefreshText(bool useEnum)
        {
            if (m_label == null)
            {
                return;
            }
            m_label.Clear();
            m_useEnum = useEnum;
            if (useEnum)
            {
                AppendText(MyTexts.Get(TextEnum));
            }
            else
            {
                AppendText(Text);
            }

            if (Text.Length < CarriagePositionIndex)
            {
                CarriagePositionIndex = Text.Length;
            }
            m_selection.Reset(this);
        }