Hi , Live Code team and Friends
I am new to this forum & Live code development . I don't know how to set ' fontSize ' for label fields . I am targeting only Mobiles ( Iphone & Android ) .
Actually my problem is , I am not able to display text in Different Screen Resolution
For 240x320 --> the font size is 40 but in case if 1280*720 the fontSize 40 is to small ...
means i want to increase font size according to screen resolution ( automaticaly )
How can i solve this problem ?
How can set the font Size for different screen resolution
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: How can set the font Size for different screen resolutio
Hi,
The following is just an example. Try your own variation of this script.
Kind regards,
Mark
The following is just an example. Try your own variation of this script.
Code: Select all
switch the screenRect
case "240,320"
case "320,240"
set the textSize of this stack to 40
set the textSize of field "Your Label Field" to 36 // just an example
break
case "1280,720"
set the textSize of this stack to 72
set the textSize of field "Your Label Field" to 68
default
set the textSize of this stack to 48
set the textSize of field "Your Label Field" to 42
end switch
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode