Skip to content
View mustyilmaz17's full-sized avatar

Block or report mustyilmaz17

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
mustyilmaz17/README.md

tk_curency

Curency variable in tkinter.

Installation

Use the package manager pip to install tk_curency.

pip install tk_curency

Usage

from tkinter import *
from tkinter import ttk
from tk_curency import *

def main():

    def set_text(event):
        try:
            x_lbt_rnd.configure(text=x.get_in_comma())
            x_lbl_txt.configure(text=x.get_text())
        except:
            pass

    root = Tk()

    x = CurencyVar()
    y = CurencyVar()
    z = x

    x.set(1000.567)
    y.set(123456789123456.135)

    x_ent = ttk.Entry(root, textvariable=x)
    x_lbl = ttk.Label(root, textvariable=x)

    x_lbt_rnd = ttk.Label(root, text=x.get_in_comma())
    x_lbl_txt = ttk.Label(root, text=x.get_text())

    y_lbl = ttk.Label(root, text=y.get_in_comma())
    y_lbl_txt = ttk.Label(root, text=y.get_text())

    root.bind('<Key>', set_text)

    x_ent.pack()
    x_lbl.pack()
    x_lbt_rnd.pack()
    x_lbl_txt.pack()
    y_lbl.pack()
    y_lbl_txt.pack()

    root.mainloop()

main()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Pinned Loading

  1. tk_curency tk_curency Public

    Curency variable in tkinter.

    Python 1

  2. mustyilmaz17 mustyilmaz17 Public

    Config files for my GitHub profile.

    Python