Hi to all,
Simple question here, how do I position a button whose text is not hard-coded, but is determined by user input?
For example:
userText=self.storedUserRecipes[0]
radioButton=DirectRadioButton(text = userText, scale=0.07, pos=(0.1,0,0.1))
Here, the list “self.storedUserRecipes” is a list of strings that the user input themselves. So the strings are of varying length and initiating their position to “0.1” x-wise doesn’t make them all start at the same place onscreen. Depending on the length of the string, some start further to the left or to the right than others.
I’ve tried this too:
...
radioButton.setPos(render2d,0.1,0,0.1)
...
to no avail. So how would I make them all start at the same position visually on the screen despite them having texts whose strings are of varying lengths?
Thanks in advance.