Make "Connect" Button Text and Image turn into "Disconnect" and switch functionality

Hey guys,

Wondering if there is possible to change the image.png used for my button and the button's text after I connect to my esp32 and to also have it when I press it (After it shows disconnect) to actually disconnect from the device and to turn back into "Connect".

Thank you, let me know if I need to screenshot any blocks.

please screenshot block for that function

1 Like

In a moment.

This is the only block I have for the button at the moment my dear:

And I'd like to know how can I move it next to pair devices, for whatever reason it doesn't let me do that atm.

you can use HorizontalArrangement1 for that

do like this :

blocks (1)

1 Like

I tried and it doesn't work. It just switches the text instead of allowing me to disonnect when I press it a second time.

you forgot to connect in the Listview.AfterPicking event my dear
see an example here

just set the Button.Text to Disconnect after the connection was successful

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like