Resize text on Button


#1

Is there a possibility to automatically resize the text of a button? make it “responsive” to the size of the button? Thank you


#2

How you change button size.


#3

The problem is that the key is set in percentage to fit all the screens while the text has a fixed depth, so I was looking for a method or to automatically wrap the text or resize it


#4

I haven’t found a way to dynamically resize the text size yet. Hopefully Thunkable can add a percentage property like width/height.


#5

Just to be clear you can dynamically resize the text size by setting the FontSize property of the button using the 'from Button set FontSize to' block. What we don’t currently have is a way to set that FontSize to a percentage or to get the size of the button, which would allow you to compute the FontSize to match the button size.

-Mark


#6

One workaround will be to set the button fontSize to the percentage of the button Width or Height. On screen initialized, from Button set FontSzie to from Button get Width * percentage.


#7

Use the block that you tell me that I set a size in any case of the font, the problem is that this device to device failure and between ios and android, you should be able to calculate, starting from a certain size, the optimal size for the screen in use, is there a block that will return the screen resolution in use? if we think that a trivial equivalence solves our problem


#8

There is no beautiful block for determining the screen resolution, but there is an example of obtaining information using a web service on the scrSystemInfo screen.

https://x.thunkable.com/projects/5be813b36245ad2916513266/project/properties/designer/


#9

@ACTech, As soon as I can, I try to study the example you posted to me. Thank you