tkinter: can't align text to the left on image label
I'm trying to align the text to the top left (using tkinter only). Nothing I tried works so far (anchor, pack, grid with sticky 'w') and I can't understand why. I'm working with several classes, and the label is within a frame defined as its parent. The frame has no attributes so far, and the text on this label is being updated when the user picks a word through the board. When I add a lot of words (3-4 lines), it does go upwards.
self.__words_found = "" WordsContainer.IMAGE = tki.PhotoImage(file="words_container2.png") self.__words_found_label = tki.Label(self.__parent, text=self.__words_found, font=("David", 18), image=WordsContainer.IMAGE, compound='center', justify='left', relief=tki.FLAT, height=105, width=500) self.__words_found_label.grid(row=0, column=0, sticky='w') def add_word(self, word): if self.__current_index == 0: self.__words_found = word else: self.__words_found = self.__words_found + ", " + word if self.__current_index > 0 and self.__current_index % 20 == 0: self.__words_found = self.__words_found + '\n' + word self.__words_found_label.config(text=self.__words_found) self.__current_index += 1
it looks like this: I want to align the 'a,a,a,a,a' under words found