I am writing a DSLR messenger, receiving information from a request. Separate screen with messages when adding a widget:
class text_opponent(Label):
def __init__(self,tx,**kwargs):
super(text_opponent,self).__init__(**kwargs)
self.text = tx
with self.canvas.before:
Color(151/255,154/255,170/255,.8)
self.rect = RoundedRectangle(pos=self.pos,size=self.size,radius=[(20, 20), (20, 20), (20, 20), (20, 20)])
But the canvas is only assigned to the last added widget https://i.stack.imgur.com/9CmvJ.png