Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Added "cx" and "cy" property to the label to change center of Label #22
I have added "cx" and "cy" property to the label, such that setting those will move the center of the text rather than the top left corner of the text. My apologies if it is already available.
Eg. for PyPortal
timeDisplay = label.Label(font,text='12:60:60',color=color) timeDisplay.cx = 160 timeDisplay.cy = 120
I like how you are using the Group's x and y to handle this! I'd rather not add separate cx and cy properties though. Instead, I'd like to see one or two properties that set the anchor position. Right how it's fixed as Center Left but you'd like Center Center.
With the anchor property, changes to the bounding box, x, or y (overridden) would trigger changing the Group's x and y.