{"id":27275444,"url":"https://github.com/limafresh/tkinter-rounded-button","last_synced_at":"2025-08-17T14:08:10.021Z","repository":{"id":287915357,"uuid":"960319940","full_name":"limafresh/tkinter-rounded-button","owner":"limafresh","description":"An unofficial rounded button for Tkinter toolkit","archived":false,"fork":false,"pushed_at":"2025-04-07T11:18:05.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T16:48:01.666Z","etag":null,"topics":["button","button-widget","buttons","gui-tkinter","modern-widgets","python-widget","rounded-button","simple-widgets","tkinter","tkinter-button","tkinter-custom","tkinter-graphic-interface","tkinter-gui","tkinter-python","tkinter-widget","tkinter-widgets","widget"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/limafresh.png","metadata":{},"created_at":"2025-04-04T08:25:07.000Z","updated_at":"2025-04-12T22:42:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"4ffc7fd8-4c60-4a95-8170-87c15e271ef0","html_url":"https://github.com/limafresh/tkinter-rounded-button","commit_stats":null,"previous_names":["limafresh/tkinter-rounded-button"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/limafresh/tkinter-rounded-button","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limafresh%2Ftkinter-rounded-button","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limafresh%2Ftkinter-rounded-button/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limafresh%2Ftkinter-rounded-button/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limafresh%2Ftkinter-rounded-button/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/limafresh","download_url":"https://codeload.github.com/limafresh/tkinter-rounded-button/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/limafresh%2Ftkinter-rounded-button/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270856775,"owners_count":24657700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["button","button-widget","buttons","gui-tkinter","modern-widgets","python-widget","rounded-button","simple-widgets","tkinter","tkinter-button","tkinter-custom","tkinter-graphic-interface","tkinter-gui","tkinter-python","tkinter-widget","tkinter-widgets","widget"],"created_at":"2025-04-11T15:55:58.673Z","updated_at":"2025-08-17T14:08:10.006Z","avatar_url":"https://github.com/limafresh.png","language":"Python","readme":"# Rounded button for Tkinter\n\n![Static Badge](https://img.shields.io/badge/license-Unlicense-purple)\n\nTkinter rounded button. An unofficial modern button for Tkinter that supports rounding.\n\n![Screenshot](https://raw.githubusercontent.com/limafresh/tkinter-rounded-button/main/screenshot.png)\n\n## How to use?\nIt's very simple - download the `RoundedButton.py` file and place it in the folder where your script file is. Then import:\n\n```python\nfrom RoundedButton import RoundedButton\n```\n\nAnd create button, for example:\n\n```python\nbutton = RoundedButton(root, text=\"My button\")\nbutton.pack()\n```\n\n## Arguments\n| Argument | Description |\n| ---------------- | ------------ |\n| **width** | int value in px, for example, width=250 |\n| **height** | int value in px, for example, height=50 |\n| **text** | text for button |\n| **font** | int (for example, font=20) or tuple (for example, font=(\"Arial\", 20)) |\n| **radius** | radius of rounding, int value |\n| **bg_color** | button background color, for example bg_color=\"red\" or bg_color=\"#f0f0f0\" |\n| **fg_color** | button text color |\n| **command** | button command |\n| **cursor** | button cursor, by default cursor=\"hand2\" |\n\n## Methods\n- `.config()`\n- `.cget()`\n\n## Code example\n### Simple example\n```python\nimport tkinter\nfrom RoundedButton import RoundedButton\n\n\ndef clickme():\n    clickme_button.config(text=\"Thanks!\", bg_color=\"yellow\", fg_color=\"black\")\n\n\nroot = tkinter.Tk()\nroot.geometry(\"200x200\")\nroot.title(\"Simple example\")\n\nclickme_button = RoundedButton(root, text=\"Click me!\", command=clickme)\nclickme_button.pack(padx=10, pady=10)\n\nquit_button = RoundedButton(root, text=\"Quit\", bg_color=\"red\", command=quit)\nquit_button.pack(padx=10, pady=10)\n\nroot.mainloop()\n```\n\n### Calculator\n\n![Screenshot](https://raw.githubusercontent.com/limafresh/tkinter-rounded-button/main/calculator.png)\n\n```python\nimport tkinter as tk\nfrom RoundedButton import RoundedButton\n\n\ndef press(key):\n    current = entry.get()\n    if key == \"=\":\n        try:\n            result = str(eval(current))\n            entry.delete(0, tk.END)\n            entry.insert(tk.END, result)\n        except Exception:\n            entry.delete(0, tk.END)\n            entry.insert(tk.END, \"Error\")\n    elif key == \"C\":\n        entry.delete(0, tk.END)\n    else:\n        entry.insert(tk.END, key)\n\n\nroot = tk.Tk()\nroot.title(\"Calculator\")\nroot[\"bg\"] = \"#2e2e2e\"\n\nentry = tk.Entry(root, font=(None, 15), relief=tk.FLAT, justify=tk.RIGHT)\nentry.pack(fill=tk.X, padx=5, pady=20)\n\nbuttons_frame = tk.Frame(root, bg=\"#2e2e2e\")\nbuttons_frame.pack()\n\nrow, column = 0, 0\n\nbuttons = [\n    \"7\",\n    \"8\",\n    \"9\",\n    \"+\",\n    \"4\",\n    \"5\",\n    \"6\",\n    \"-\",\n    \"1\",\n    \"2\",\n    \"3\",\n    \"*\",\n    \"C\",\n    \"0\",\n    \"=\",\n    \"/\",\n]\n\nfor button_text in buttons:\n    button = RoundedButton(\n        buttons_frame,\n        width=50,\n        height=50,\n        radius=20,\n        text=button_text,\n        font=20,\n        command=lambda key=button_text: press(key),\n    )\n    button.grid(row=row, column=column, padx=5, pady=5)\n\n    if button_text in [\"+\", \"-\", \"*\", \"/\"]:\n        button.config(bg_color=\"orange\")\n    elif button_text == \"=\":\n        button.config(bg_color=\"blue\")\n    else:\n        button.config(bg_color=\"#6e6e6e\")\n\n    column += 1\n    if column == 4:\n        column = 0\n        row += 1\n\nroot.mainloop()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimafresh%2Ftkinter-rounded-button","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flimafresh%2Ftkinter-rounded-button","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flimafresh%2Ftkinter-rounded-button/lists"}