Switch contents of Button

Hello, as you can see on screenshot below have button which holds two states of content one is text Login and second is text Please Wait with spinning circle.

I would like to ask you how can I switch between it, I tried “enabled” but it is still visible it is just grayed out, then I tried visibility which works but problem is that it will keep resized button (you can see on second screenshot). So I wonder what is correct way of doing it.

image

image

I’m pretty sure the usual way to achieve this is to change the visibility of both elements at the same time:

image

image

The logic:

VisibilitySwitch

In the designer mode of your widget, you will not see any change about setting the visibility state, so you probably tried it and ignored it. You must try it at runtime to see the results.