I am back with another quick tip for Canvas apps and this time it’s related to text alignment of Toggle control in canvas apps.
We all love toggle controls. And if you worked with Canvas apps you know that any boolean field will display as toggle control.
I have inserted a Toogle control on the form. Below is Toggle text when the Toggle value is False.
And below is the Toggle text when the Toggle value is True.
Now the problem is obvious. If you see the text alignment, the Small Text is appearing on the extreme right which is kind of awkward in terms of UI.
Now the obvious thing is to change the horizontal alignment of the text. But unfortunately there is no way you can do that for now. So let’s see how it can be handled.
The first thing is to set the Show Label property of the Toggle control to false.
The next thing to do is to insert a label to show the text information. Stretch it to the max length to accommodate the longest text.
Set the Text property of the label to the below formula. In my case the name of the control is Toggle1. You may need to change the name of the control in formula.
Below is the final behavior of the control in action.
Hope this helped!
Debajit Dutta
Business Solutions MVP
Discover more from Debajit's Power Apps & Dynamics 365 Blog
Subscribe to get the latest posts sent to your email.