Added kwargs passthrough to tkinter.Tk on init of Window #558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello,
First of all, thanks for providing such a nice wrapper around basic tkinter application. This modules allows to achieve a really nice looking tkinter application as opposed to using bare tkinter app.
I have noticed that
Window
class usage is preffered as opposed totkinter.Tk()
when creating main/root window of an application. However, I have realised thatWindow
class is missing some argument passthrough functionality - whenWindow
's classsuper
(in this case -tkinter.Tk()
) class init method is called, there is no possibility to pass some arguments which are available according to an official tkinter documentation.Hence, I have added missing functionality in.
Motivation behind it is following - I am using Ubuntu with GNOME environment. When creating a tkinter window using
Window
class, it creates an app which name defaults toTk
when I am hovering over the icon of the running app. In order to adjust it, I must change the value ofclassName
. However, there is no way of controlling it fromWindow
class & I am not willing to revert back to "old" way of creating a window via calling tkinter.Tk() myself. Hence, I decided to make my contribution at this stage to lift the limitation ofttkbootstrap
'sWindow
class as this is where the limitation resides.Current behaviour on Ubuntu using GNOME:
Proposed change allows to change the pop-up text using
className
under Ubuntu GNOME:Below is the minimal code that I used to achieve the result displayed above: