ajongbloets / julestk Goto Github PK
View Code? Open in Web Editor NEWA simple MVC Framework for Tkinter in Python
License: MIT License
A simple MVC Framework for Tkinter in Python
License: MIT License
hello,
i try many times to change the window size.. i could not
how to change main window size and toplevel window size too?
this MVC is little difficult than simple build app.. its not has mainwindow(Tk) or root = Tk()
thanks
I try to use manage multiple views in one controller, this controller can switch showing view and hiding view.
I try to use the ViewSetController to manage the controllers, but turn out it bring some unnecessary complexity in my point of view.
any suggestion?
Thanks for a great framework!
Is it possible to have nested views, where the parent and child views both have controllers? Where the parent view controls the position of the child view within its grid layout in its _prepare()
method?
I can create a controller with a child controller:
class MainController(Controller):
VIEW_CLASS = MainView
def _prepare(self):
super(MainController, self)._prepare()
self.child = ChildController(self)
self.application.add_controller('child', self.child)
return self
def _start(self):
super(MainController, self)._start()
self.child.start()
class ChildController(Controller):
VIEW_CLASS = ChildView
def _prepare(self):
super(ChildController, self)._prepare()
return self
But then I struggle to define _prepare()
in the views... I want to set the grid position of the child view in the _prepare()
method of the parent view, and then completely independently set the layout of the contents of the child view in its own _prepare()
method. But self.controller.child
doesn't exist yet.
class MainView(View):
def _prepare(self):
self.configure_grid(self)
self.configure_row(self, 0)
self.configure_column(self, 0)
# I'd like to position the child view within this main view?
# self.configure_grid(self.controller.child.view, row=0, column=0)
lbl = ttk.Label(self, text='Label in MainView')
self.add_widget('label1', lbl)
self.configure_grid(lbl, row=1, column=0)
class ChildView(View):
def _prepare(self):
self.configure_grid(self)
lbl = ttk.Label(self, text='Label in ChildView')
self.add_widget('label1', lbl)
self.configure_grid(lbl, row=0, column=0)
Any tips?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.