{ "info": { "author": "Saad Mairaj", "author_email": "Saadmairaj@yahoo.in", "bugtrack_url": null, "classifiers": [ "Environment :: MacOS X", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Widget Sets" ], "description": "# tkmacosx\n\nThis module provides some modified widgets of Tkinter which works better on macOS and some more useful functions and classes as well. For example Button of tkmacosx which looks and feels exaclty like a native tkinter button can change its *background* and *foreground* colors on a mac.\n\n## Installation\n\n $ pip install tkmacosx\n\n## Usage\n\n from tkinter import *\n from tkmacosx import SFrame, Button\n\n root = Tk()\n frame = SFrame(root, bg='pink')\n frame.pack()\n\n for i in range(50):\n b = Button(frame, text='Button %s'%i, borderless=1)\n b.pack()\n\n root.mainloop()\n\n\n## Demonstration\n\n $ python -m tkmacosx\n\n\n## Widgets\n\n\n### Button Widget\n\nThe tkmacosx `Button` widget is similar to defualt tkinter `Button` but supports all arguments of on a macos including some extra features. \n\n - **Argument:**\n\n Modifies one or more widget options. If no options are given, the method returns a dictionary containing all current option values. All the options are pretty much the same as Tkinter [Button](https://effbot.org/tkinterbook/button.htm). Here are the extra options of tkmacosx Button.\n\n * `activebackground`: Background color to use when the button is active. Give tuple of two colors for gradient effect in active background.\n * `activeimage`: Image to use when the button is active.\n * `activebitmap`: Bitmap to use when the button is active.\n * `bordercolor`: The color of the button border.\n * `borderless`: Blend the button with it's parent's background results in a clean look with no square borders. It will change color automatically.\n * `disabledbackground`: The color to use when the button is disabled.\n\n - **Usage:**\n\n from tkinter import *\n from tkmacosx import Button\n\n root = Tk()\n\n B1 = Button(root, text='Mac OSX', bg='lightblue', fg='yellow', borderless=1)\n B1.pack()\n\n root.mainloop()\n\n\n### SFrame Widget\n\nThe tkmacosx `SFrame` widget is just like a tkinter Frame but vertically scrollable.\n\n - **Arguments:**\n\n Modifies one or more widget options. If no options are given, the method returns a dictionary containing all current option values. All the options are pretty much the same as Tkinter [Frame](https://effbot.org/tkinterbook/frame.htm). Here are the extra options of tkmacosx SFrame.\n\n * `scrollbarwidth`: Set the width of scrollbar.\n * `mousewheel`: Set mousewheel scrolling.\n\n - **Usage:**\n\n from tkinter import *\n from tkmacosx import SFrame\n\n root = Tk()\n frame = SFrame(root, bg='pink')\n frame.pack()\n\n for i in range(50):\n Button(frame, text='Button %s'%i).pack()\n\n root.mainloop()\n\n\n## Variables\n\n### ColorVar Variable\n\nColorVar of tkmacosx set same color to each widget it is assigned to. As ColorVar is a tkinter variable wrapper so it will change the color of widgets whenever the change is made to ColorVar instances. ColorVar takes HEX values or all the color names which tkinter supports and the `get()` method returns only the HEX value. It will work with all of the following keyword arguments of diffenert widgets. ***'fg', 'foreground', 'bg', 'background', 'activebackground', 'activeforeground', 'disabledforeground', 'highlightbackground', 'highlightcolor', 'selectforeground', 'readonlybackground', 'selectbackground', 'insertbackground', 'disabledbackground'*** *(might work with more but have not tested).*\n\n - **Usage:**\n\n from tkinter import Tk, Label\n from tkmacosx import colors, ColorVar\n\n root = Tk()\n root.geometry('100x100')\n\n color = ColorVar()\n color_list = list(colors.OrderedHex)\n L = Label(root, textvariable=color, bg=color)\n L.place(relx=0.5, rely=0.5, anchor='center')\n\n def change_color(c=0):\n if c >= len(color_list): c=0\n color.set(color_list[c])\n root.after(70, change_color, c+1)\n\n change_color()\n root.mainloop()\n\n### DictVar Variable\n\nDictVar of tkmacosx stores python dictionary. It is very similar to tkinter `StringVar` with few modifications to it. `DictVar.get()` returns an instance of `dict` type whereas StringVar returns `str` type also DictVar method `get()` is a bit different `get(key=None, d=None)` get a key from `get()` method if `key=None` it will return the complete dictionary.\n\n - **Usage:**\n\n from tkinter import *\n from tkmacosx import DictVar\n\n root = Tk()\n dictionary = DictVar(value = {'width': 100, 'height': 200})\n\n print(type(dictionary.get()))\n print(dictionary.get())\n print(dictionary.get('width'))\n\n## Changelog\n\n- **0.0.5**\n * Fixed a bug where `borderless` for multiple buttons does not work properly.\n * Improved __init__.py file.\n\n- **0.0.4**\n * Fixed an import error.\n\n- **0.0.3**\n * Added docstring.\n\n- **0.0.2**\n * Fixed an error running command `python -m tkmacosx` .\n\n- **0.0.1**\n * First import.\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Saadmairaj/tkmacosx", "keywords": "tkinter,macos,variable,widgets", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "tkmacosx", "package_url": "https://pypi.org/project/tkmacosx/", "platform": "", "project_url": "https://pypi.org/project/tkmacosx/", "project_urls": { "Homepage": "https://github.com/Saadmairaj/tkmacosx" }, "release_url": "https://pypi.org/project/tkmacosx/0.0.5/", "requires_dist": [ "colour", "pillow" ], "requires_python": "", "summary": "Tkmacosx is a Python library extension to the Tkinter module for macOS", "version": "0.0.5" }, "last_serial": 5377373, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "e5702044cbb865eed9e43efea1d3fce1", "sha256": "557a9336d5f4f063d4c3af423995b95d3e132f27b8bfe63eef79d4a2d50d8cd8" }, "downloads": -1, "filename": "tkmacosx-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "e5702044cbb865eed9e43efea1d3fce1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4436762, "upload_time": "2019-06-08T14:21:35", "url": "https://files.pythonhosted.org/packages/4a/f5/375d658e17f0bbaa5a7485bb68f7d8dc5575e5378e0b71b9a5ca81b5e5c1/tkmacosx-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "732557a24c61e4e6a33a2c8c3e592cea", "sha256": "e22eb3bfa4c2cbdaf27ecca602a5e98cf04edfd1d6568cde29af984445f9c00b" }, "downloads": -1, "filename": "tkmacosx-0.0.1.tar.gz", "has_sig": false, "md5_digest": "732557a24c61e4e6a33a2c8c3e592cea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4438969, "upload_time": "2019-06-08T14:21:39", "url": "https://files.pythonhosted.org/packages/d8/bf/7c37b7ff1d3c3293d5e828be9396c046800df664a4915b649d3a45bf93b3/tkmacosx-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "22c868bd5fc92c38c462109160316ee1", "sha256": "63fd9d824ccc90676cab5e622d702b7a6ee6f6ec656008c12deb22ee1ead8253" }, "downloads": -1, "filename": "tkmacosx-0.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "22c868bd5fc92c38c462109160316ee1", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4437028, "upload_time": "2019-06-08T16:21:21", "url": "https://files.pythonhosted.org/packages/f5/c5/c238e80fa9409831ca60c5fcb8842d97f70d8ddcbc502bdd01e8d7aec45c/tkmacosx-0.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b3da5fa68bde24b0d457010f27a0a282", "sha256": "3551acce56aab64ab0fe10b7b95228ef638558efa1cd52e5eaf18e6dc4c248df" }, "downloads": -1, "filename": "tkmacosx-0.0.2.tar.gz", "has_sig": false, "md5_digest": "b3da5fa68bde24b0d457010f27a0a282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4439358, "upload_time": "2019-06-08T16:21:24", "url": "https://files.pythonhosted.org/packages/81/00/611a6e112547f73d355e3d47c64f1494920a3c1500187d7dc633290be94c/tkmacosx-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2023f589b0d653163b747a50d3466597", "sha256": "296a9793c30e6634294167c5bfa28917d9c54985c134f7a4928e4ce98fa46be3" }, "downloads": -1, "filename": "tkmacosx-0.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "2023f589b0d653163b747a50d3466597", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4437027, "upload_time": "2019-06-08T16:23:51", "url": "https://files.pythonhosted.org/packages/6d/45/19e79c5b7d8f32140848bce1876352670ab9974284e279902ac9c1af59a0/tkmacosx-0.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "336aa4febf406ab8f9a6f2ad59d78e90", "sha256": "dc7b690a3178c59c757cd105c844ad2b84afa6d29fc57ace34a240825139e038" }, "downloads": -1, "filename": "tkmacosx-0.0.3.tar.gz", "has_sig": false, "md5_digest": "336aa4febf406ab8f9a6f2ad59d78e90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4439353, "upload_time": "2019-06-08T16:23:53", "url": "https://files.pythonhosted.org/packages/86/ec/16a872912c9cc0e70f8d91ac4fe5d52a79073c26a2bf0e8b58de775b7174/tkmacosx-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "3372f2f27e568ee1b430164a015ac86e", "sha256": "88fd87de7db8b891380fcb515cf0c8309bd6dc0bdb94c4393e72a432db15e7a1" }, "downloads": -1, "filename": "tkmacosx-0.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "3372f2f27e568ee1b430164a015ac86e", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4437041, "upload_time": "2019-06-08T16:38:54", "url": "https://files.pythonhosted.org/packages/cc/70/ab8ed77579c8ec3157aa7a75c686d69f313bbe0e9b1a9a672df76079e498/tkmacosx-0.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0d80a9b0a9754c216dc2eb4e69a3900d", "sha256": "ff770de242fcfccd2492318b4af86d206f4b95d04f94a5860efc7dbd3bb5bc87" }, "downloads": -1, "filename": "tkmacosx-0.0.4.tar.gz", "has_sig": false, "md5_digest": "0d80a9b0a9754c216dc2eb4e69a3900d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4439388, "upload_time": "2019-06-08T16:38:56", "url": "https://files.pythonhosted.org/packages/d9/d9/b9de41783e5f287c1bdc814cbc8bfbb6376953f9899bef21d5684e87d0f6/tkmacosx-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "9f921d1dc952e2642ac5cdba570a2a43", "sha256": "dc4daf17fe7458160aaeda6584fc2e060f19340e3856770da84fbd98a3244286" }, "downloads": -1, "filename": "tkmacosx-0.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "9f921d1dc952e2642ac5cdba570a2a43", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4437217, "upload_time": "2019-06-09T10:15:53", "url": "https://files.pythonhosted.org/packages/31/1b/182a91d61e217b633170bf19d741375a927c8e38c84e299cae3028c31ca0/tkmacosx-0.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c5f0990ae1bde82708c92ababad21c51", "sha256": "1a99be49eb1c331bfd059fbde77e551d93dd020dc3869cdf1da904f5b054c4c9" }, "downloads": -1, "filename": "tkmacosx-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c5f0990ae1bde82708c92ababad21c51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4439755, "upload_time": "2019-06-09T10:15:56", "url": "https://files.pythonhosted.org/packages/ea/ac/d61367db5ede558679705e09c1b31d32df053fdb158e59e56f3ff5da4598/tkmacosx-0.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9f921d1dc952e2642ac5cdba570a2a43", "sha256": "dc4daf17fe7458160aaeda6584fc2e060f19340e3856770da84fbd98a3244286" }, "downloads": -1, "filename": "tkmacosx-0.0.5-py2-none-any.whl", "has_sig": false, "md5_digest": "9f921d1dc952e2642ac5cdba570a2a43", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4437217, "upload_time": "2019-06-09T10:15:53", "url": "https://files.pythonhosted.org/packages/31/1b/182a91d61e217b633170bf19d741375a927c8e38c84e299cae3028c31ca0/tkmacosx-0.0.5-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c5f0990ae1bde82708c92ababad21c51", "sha256": "1a99be49eb1c331bfd059fbde77e551d93dd020dc3869cdf1da904f5b054c4c9" }, "downloads": -1, "filename": "tkmacosx-0.0.5.tar.gz", "has_sig": false, "md5_digest": "c5f0990ae1bde82708c92ababad21c51", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4439755, "upload_time": "2019-06-09T10:15:56", "url": "https://files.pythonhosted.org/packages/ea/ac/d61367db5ede558679705e09c1b31d32df053fdb158e59e56f3ff5da4598/tkmacosx-0.0.5.tar.gz" } ] }