Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2170
UltraButton - WrapText
posted

Is there a way to determine when the text is being wrapped on an UltraButton?

Parents
  • 53790
    Verified Answer
    posted

    Hello rblanchard,

    At that moment we have not such property but maybe one possible approach to determinate this condition with approx high accurancy could be if you are using the code below:

    Graphics gr = ultraButton1.CreateGraphics();

    SizeF sz = gr.MeasureString(ultraButton1.Text, ultraButton1.Font);

    if (ultraButton1.Width <= (int)sz.Width + 10)

                {

           MessageBox.Show("The text is wrapped");

                }

    else

                {

            MessageBox.Show("The text is not wrapped");

                }

     

    Please let me know if  you have any questions,

    Regards

Reply Children
No Data