Giter VIP home page Giter VIP logo

julestk's People

Contributors

ajongbloets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

julestk's Issues

How to Change window size

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

manage multiple views in one controller

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?

Nested views with own controllers

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.