Create a volleyball rotation

good evening, I'm creating an app to manage rotations in volleyball. I inserted 6 labels, lbl1,lbl2,lbl3,lbl4,lbl5,lbl6 where the initial formation will be inserted after having inserted it in the txt field. After having inserted btn2 the formation is inserted in the labels. All ok so far. The problem arises in managing the rotation by pressing btn 3. What do you suggest I do?

Show your relevant blocks

Explain how subsequent rotations will look, how many players in total, any rules for when you can rotate.

Are you using lists ?

According to

all you need to do is rotate 6 Label .Text values clockwise?

1 Like

there are six players on the field (six labels), when I press the btn2 button it must rotate. I need something simple. In case I want to make a change I would like to add a btncambio button where I insert the new player and the one who replaces him.

all you need to do is rotate 6 Label .Text values clockwise?
come faccio ?

This post was flagged by the community and is temporarily hidden.

Dear @soleluna (Roberto),
you can do something like:

I've not tested it, but it should work.

Sono Italiano per cui il resto te lo dico in italiano: non è proprio un algoritmo molto "elegante", ma così forse è più leggibile.
RotateCW (clockwise, in senso orario, non è detto che sia verso sinistra, dipende da come assegni le label alla posizione dei giocatori, ma gestisci tu CW e CCW a seconda di come vuoi fare la rotazione e come assegni i giocatori :grin:)

Se hai bisogno scrivi pure.
Ciao !

1 Like

(post deleted by author)

con questo sistema funziona, grazie mille, adesso dovrei aggiungere un tasto per il cambio giocatore, esempio cliccando sulla label posso cambiare il numero. Magari potessi prendere i sostituti da una lista di sostituti....