问题
I'm using
self.exampleLabel = tk.Label(self,image=self.exampleImage,
text="test",compound="left")
to create a list of labels and what I got now is: I was wondering is there a way that can enable me to align the star except for put them in another column of labels?
Thanks!
回答1:
You can make it so that all of the images align to the far left or right, but the label has no concept of columns. You can make it appear like there are two columns if all of the images you use have the same dimensions, however.
If you want them to be to the far left, add anchor='w'
to the label, which will cause the label contents (both image and text) to be "anchored" to the west side of the widget.
来源:https://stackoverflow.com/questions/40997154/tkinter-labels-image-in-fixed-position