How can I make the font size of this text label within a custom component (an app footer) change according to screen size?
The following code (on the size property of this label) does not result on any change:
Switch(App.ActiveScreen.Size,1,12,2,14,3,16)
Hi @fpsdf
My bad, can you try this:
Switch(App.ActiveScreen.Size, ScreenSize.Small, 12, ScreenSize.Medium, 13, 14)
If you have any questions or feedback, please let me know. Have a great day! 😊
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube| [My blog]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
Thank you, @SpongYe!
Yet, the Parent.Size part gets underlined in red, stating "Name isn't valid. 'Size' is not recognized.".
Let me just remind you that this is a label inside of a custom component (I'll attach the hierarchy below)
Hi @fpsdf
To increase the font automatically the ScreenSize can help with that when the canvas screen changes, try this formula:
Switch(Parent.Size, ScreenSize.Small,12, ScreenSize.Medium,18,30)
The font will be 12 in the small screen and 18 for the medium screen otherwise it will be 30 ,and you can change these font sizes to your desired font sizes.
If you have any questions or feedback, please let me know. Have a great day! 😊
-----------------------
PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube| [My blog]
I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻
WarrenBelz
58
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
36