-
Trying to figure it out but don't know how to do it. |
Beta Was this translation helpful? Give feedback.
Answered by
dipeshSam
Jul 4, 2024
Replies: 1 comment 4 replies
-
Access internal text box of CTkTextbox. Reason of so is mentioned in the answer of one of the earlier discussion. Sample code: from tkinter import *
from customtkinter import CTkTextbox
from PIL.Image import open as open_
from PIL.ImageTk import PhotoImage
if __name__ == "__main__":
app = Tk()
tb = CTkTextbox(app)
tb.pack(padx=50, pady=50)
tb.insert("1.0", "Some Text")
tk_img = PhotoImage(open_("theImage.png"))
tb._textbox.image_create("1.1", image=tk_img)
app.mainloop() It will be helpful. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Gasiro
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Access internal text box of CTkTextbox. Reason of so is mentioned in the answer of one of the earlier discussion.
Sample code:
It will be helpful.
Regards.