Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_bidi_support not working for Text widget #17

Open
Mohammad-Amin-Asadi opened this issue Mar 24, 2023 · 1 comment
Open

add_bidi_support not working for Text widget #17

Mohammad-Amin-Asadi opened this issue Mar 24, 2023 · 1 comment

Comments

@Mohammad-Amin-Asadi
Copy link

Iam using your add_bidi_support for entry and everything is fine but for Text widget it is not working, What can I do?

@Aboghazala
Copy link
Owner

@prankshtain
there is no support for Text widget
you can work around this by render the characters first then add it to "Text widget"

example:

import tkinter as tk
from awesometkinter.bidirender import render_text
root = tk.Tk()

text = 'السلام عليكم'

T = tk.Text(root, font='any 20')

T.insert(tk.END, 'Unprocessed Text: ' + text + '\n\n')

rtext = render_text(text)
T.insert(tk.END, 'Rendered Text: ' + rtext)

T.pack()
root.mainloop()

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants