locked
Is it possible to automatic adjust the font if the resolution change?

    Question

  • I want my app to have an auto font size every time the resolution change, because there are some resolutions that 

    disrupt the whole project of mine.

    Wednesday, October 24, 2012 8:56 AM

Answers

  • There isn't a way to automatically change this. You would have to detect the resolution change and then change the fonts. How specifically to do that will depend on the specific language you are using.

    What is the scenario you want this for? In general a runtime resolution change will come at the user's request, generally because they want to be able to enlarge or reduce the size of the image. If you change the fonts to counteract the change then this will defeat the user's goal and possibly make your app unusable.

    --Rob

    • Proposed as answer by Xudong He Friday, October 26, 2012 4:57 PM
    • Marked as answer by Franz_Justin Saturday, October 27, 2012 9:05 AM
    Wednesday, October 24, 2012 8:54 PM
    Owner

All replies

  • There isn't a way to automatically change this. You would have to detect the resolution change and then change the fonts. How specifically to do that will depend on the specific language you are using.

    What is the scenario you want this for? In general a runtime resolution change will come at the user's request, generally because they want to be able to enlarge or reduce the size of the image. If you change the fonts to counteract the change then this will defeat the user's goal and possibly make your app unusable.

    --Rob

    • Proposed as answer by Xudong He Friday, October 26, 2012 4:57 PM
    • Marked as answer by Franz_Justin Saturday, October 27, 2012 9:05 AM
    Wednesday, October 24, 2012 8:54 PM
    Owner
  • Hi,

    You cannot have auto font size every time the resolution changes. But you can calculate and set the font size on Window Size change event. This event will fire, every time the size of window / resolution changes.


    -Prasanna

    Saturday, October 27, 2012 4:26 PM
  • try to wrap the textbox or text control in a viewbox. It will take care.

    -------------------

    please mark as answer if this helps you.

    • Edited by TradPal Friday, November 23, 2012 4:37 PM
    Friday, November 23, 2012 4:36 PM