Multiple Windows With ScreenManager - Python Kivy GUI Tutorial #31

Поделиться
HTML-код
  • Опубликовано: 14 ноя 2024

Комментарии • 145

  • @Codemycom
    @Codemycom  3 года назад +1

    ▶️ Watch Entire Kivy Playlist ✅ Subscribe To My RUclips Channel:
    bit.ly/37LrJ27 bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/2Ls0Fvo

    • @videosincoming6850
      @videosincoming6850 3 года назад

      oh !! I found the comment... but its not pinned i guess..

    • @Codemycom
      @Codemycom  3 года назад

      @@videosincoming6850 Of course it is pinned.

    • @harshitgupta1367
      @harshitgupta1367 3 года назад

      Sir got error of kivy.factory.FactoryException : Unknown class

    • @elvy842
      @elvy842 2 года назад

      Is this an automatic response because it's not that useful.
      The particular issue I was facing in my question was not covered on the Kivy course, that's why I asked.
      I found an answer though:
      Item1 = self.manager.get_screen('Screen1').ids.item1_id.text
      Item2 = self.manager.get_screen('Screen2').ids.item2_id.text

    • @Codemycom
      @Codemycom  2 года назад

      @@elvy842 What response is that? lol Response to what?

  • @minihohtis5906
    @minihohtis5906 2 года назад +7

    Your explenations are more clear than the Kivy documentation.

    • @Codemycom
      @Codemycom  2 года назад +5

      Ha yeah they're pretty terrible

  • @CoderBB
    @CoderBB 3 года назад +10

    Sir don't forget to create a playlist on Android development using kivy.... I am eagerly waiting for this...
    And thanks for this awesome playlist on kivy 🙌

    • @altaaf_taafuuu08
      @altaaf_taafuuu08 2 года назад

      Hi, peace be upon you. The same is for android, you just need to have Python on android. All this will work on android

  • @DCMPSaliva
    @DCMPSaliva 3 года назад +15

    every tutorial shows how to change between screens with buttons - but theres a lack of information on how to call methods from current screen or other screens once you have screens set up. im so confused

    • @pashabuddha
      @pashabuddha 3 года назад

      The same, bro

    • @wat3rfall735
      @wat3rfall735 3 года назад

      you can use the root.manager.get_screen('screen_name').widget_id.parameter (like root.manager.get_screen('main_window').label.text) inside your .kv file

  • @akatproje3448
    @akatproje3448 2 года назад

    Thank you very much, there is so little conversations and Educations like yours beautiful videos...

  • @tuhinbhowmick8424
    @tuhinbhowmick8424 3 года назад

    I was waiting since 9:00 pm (IST) to watch your video

  • @infinitespace1982
    @infinitespace1982 3 года назад +3

    For those of you who run into the problem where you can't choose the direction of the transition, the Kivy 2.0.0 documentation states using 'root.manager.transition.direction = 'left/ right' instead, which worked for me.

    • @davidakavegasrepoman
      @davidakavegasrepoman 2 года назад +3

      I have a error that says: object has no attribute 'manager'

  • @elitecoder9246
    @elitecoder9246 3 года назад

    Either You Answer Or Not YOU ARE AWESOME MAN!!!!!
    Please Pray For My Next Generation That They May Get Me As Their Super Powered Father As You.

    • @Codemycom
      @Codemycom  3 года назад +1

      :-)

    • @elitecoder9246
      @elitecoder9246 3 года назад +1

      @@Codemycom Mail Please! I Want To Talk With You. Please Don't Make Me Hopeless.

    • @Codemycom
      @Codemycom  3 года назад +1

      @@elitecoder9246 You're talking to me right here.

    • @elitecoder9246
      @elitecoder9246 3 года назад

      @@Codemycom ok my ♥ly tutor

  • @santoshgujar5237
    @santoshgujar5237 2 года назад

    Thank you, Sir, you are Best Teacher

  • @حسن-ي2ر2ص
    @حسن-ي2ر2ص 3 года назад

    Thank you very much for all the videos that explained kivy 🌹🌹

  • @codewarrior4458
    @codewarrior4458 3 года назад +1

    Just Subscribed 😁😁

  • @Tawkir_Choudhury
    @Tawkir_Choudhury 2 года назад

    This is very useful for me. Thank you very very much ❤️

  • @samadnarayan7262
    @samadnarayan7262 2 года назад +1

    Thanks for this awesome video, John. I wanted to ask that what is the difference between, on_release and on_press.
    Thanks,
    Samad Narayan

    • @Codemycom
      @Codemycom  2 года назад

      Just what they say...one happens when you press the button, the other when you release the button

    • @rreemmccoo1
      @rreemmccoo1 2 года назад

      i tryed to update a list and display the same list.
      When i only used On_press it only showed the old list, second press was the updated list.
      When i changed it to On_press "update list" and On_release " Show list" it worked

  • @chriver
    @chriver 3 года назад

    Thnx! Your video's are very helpful to me!

  • @m.nikolatesla
    @m.nikolatesla 3 года назад

    Thank you bro. I like your videos.

  • @justanorthernlight
    @justanorthernlight 3 года назад +1

    If you're using a screen manager nested inside a different layout (tabbed, for example), how do you call the next screen? app.root.current doesn't work for me. A tutorial on how to store a variable with one button and then access it elsewhere in the app would also be nice.

    • @wat3rfall735
      @wat3rfall735 3 года назад

      i guess you can use the root.manager.get_screen('screen_name').widget_id.parameter (like root.manager.get_screen('main_window').label.text) inside your .kv file

  • @eddw123
    @eddw123 3 года назад

    Still useful to me😁👍just this functionality looks more like “scrolling pages ,one window”, Do you think that something like this can be implemented in one of the AccordionItem tabs?

  • @whitebird365
    @whitebird365 3 года назад +3

    Nice!
    Please how can we send some data from one screen to another?

    • @wat3rfall735
      @wat3rfall735 3 года назад

      you can use the root.manager.get_screen('screen_name').widget_id.parameter (like root.manager.get_screen('main_window').label.text) inside your .kv file

  • @superarno121
    @superarno121 3 года назад +1

    Why do you have to specify 'app' in
    app.root.current
    but not in
    root.manager.transition.direction?

  • @Alikhan-xm1xq
    @Alikhan-xm1xq Год назад

    Thank you very much!!!!

  • @elvy842
    @elvy842 3 года назад +2

    Hi John, great introductory material.
    Say I have screen1, screen2 and screen3, which are all stored in different modules,
    and I want to display the values from screen1 & screen2
    in screen3, how do I go about achieving this?

    • @crypto1886
      @crypto1886 3 года назад

      i belive you need to use the #:import x.y.z command in kivy but i dont know how to use it as it is quite complicated

    • @sweeterdeeker9436
      @sweeterdeeker9436 2 года назад

      possibly save as JSON file and retrieve...? this is something I am dealing with also. I am trying to figure out how to use python code to create a window that is not relative, but boxlayout or stacklayout or scrollview...

    • @elvy842
      @elvy842 2 года назад +4

      @@sweeterdeeker9436
      The following worked for me, I suppose this is me answering my own question lol:
      Item1 = self.manager.get_screen('Screen1').ids.item1_id.text
      Item2 = self.manager.get_screen('Screen2').ids.item2_id.text
      I hope this is useful to you too
      Regards
      Elvy

  • @samrierena1723
    @samrierena1723 3 года назад +2

    guys please help i can't access my kivymd variable it says " 'super' object has no attribute '__getattr__' "...please help as soon as possible

  • @brunofonseca8798
    @brunofonseca8798 2 года назад

    Hi, great video!
    It is possible to use screen manager for add new screens in a popup?

  • @bigsun4022
    @bigsun4022 2 года назад

    Thanks. helped a lot

  • @glendydesabille3977
    @glendydesabille3977 3 года назад +1

    Thank u for this, ive really learn a lot in ur channel, may u make also using animation in kivy or transistion?

  • @junkpow
    @junkpow 3 года назад +3

    kivy.factory.FactoryException: Unknown class
    How to Fix???

    • @rreemmccoo1
      @rreemmccoo1 2 года назад

      This is what i used in my .py
      def build(self):
      sm = ScreenManager()
      sm.add_widget(MainWindow(name="main"))
      sm.add_widget(SecondWindow(name="game"))
      return sm
      i didn't use the class WindowManager(ScreenManager)
      also in the .kv file i removed the Manager setup

  • @ice-luxcondicionadoresdear8357

    ola estou criando um app com kivy porem nao encontro em lugar algum como fazer reconhecer piscada de olho atraves da camera com kivy, vc saberia me ajudar

  • @PieAzalea
    @PieAzalea Год назад

    Guys, here to share my struggles and the solutions in case someone faces the same situation.
    I've been writing the exact same code but the output was a BLANK BLACK screen.
    I found out later I had to use " ScreenManager().addwidget(..screen class name..) " and then " return ScreenManager() " in build(self) attribute instead of "return kv".
    Still wondering why can't I write as simple as the code in this video though.

  • @hosniali9651
    @hosniali9651 2 года назад

    Hello ,how can I disable the minimize , maximize and close buttons in the kivy application

  • @haddad__abdelaziz320
    @haddad__abdelaziz320 3 года назад

    Think you
    How to add mddatatable to screen manager

  • @learnnow9598
    @learnnow9598 3 года назад

    Love and love only💙. Bro can you make a small video for packaging kivy for android in Linux?

    • @Codemycom
      @Codemycom  3 года назад

      Eventually I'll get to that.

  • @vibhar7999
    @vibhar7999 3 года назад +1

    How to create .kv file ??
    Which version of pycharm you are using ?
    Because I use community versions...........

    • @Codemycom
      @Codemycom  3 года назад

      I don't use or recommend pycharm.

    • @vibhar7999
      @vibhar7999 3 года назад

      👍

    • @vibhar7999
      @vibhar7999 3 года назад

      Is there any way we can do it in pycharm .......
      If yes then please let me know

    • @Codemycom
      @Codemycom  3 года назад

      @@vibhar7999 I don't use or recommend pycharm.

  • @rreemmccoo1
    @rreemmccoo1 2 года назад

    maybe i just need to learn a bit more but where do you def your functions?
    I created my mainpage without screenmanager and it worked. now i trying to ge a second page and ik get AttributeError: 'ScreenManager' object has no attribute 'submit'

  • @Leo-go4nf
    @Leo-go4nf 11 месяцев назад

    Does anyone know a way to make the screens just appear instead of scrolling into place?

  • @atheeb845
    @atheeb845 2 года назад

    Please post a video to switch screens with python code.

  • @kevincranfield2471
    @kevincranfield2471 2 года назад

    Hi trying to follow this tutorial where I am confused is if I have code already in my layout(widget) class ( a button press in my kv file), where does the press function go once I remove the original layout class.. (hope this makes sense) thank you

  • @crishl19
    @crishl19 2 года назад

    but if am working in app where I have my app how to I do screens ?

  • @akshaygangwani9875
    @akshaygangwani9875 2 года назад

    hi what if an app requires more than 10 pages and each having many lines of code, Like if i want to create an ecommerce app? I am able to create basic small apps but if i try to create bigger apps my codes gets dirty!

  • @bigsun4022
    @bigsun4022 2 года назад

    Hello, do you think Python w kivy is good for desktop apps development or There is a better Lang?

  • @rajaryan7167
    @rajaryan7167 3 года назад +1

    namaste sir from india

  • @sweeterdeeker9436
    @sweeterdeeker9436 2 года назад

    Do you have an extensive python code for creating kivy with multiple screens?
    something with buttons, etc from a list?

  • @MyMaxcy
    @MyMaxcy 2 года назад +1

    How can I add and call the widget ID inside the child screens?

  • @alexwoodhead6471
    @alexwoodhead6471 2 года назад

    just throw's errors with kv = Builder.load_file('new_window.kv")" ...

  • @NoTakeOnlyThrow
    @NoTakeOnlyThrow 3 года назад

    if you were to have multiple buttons within screens that lead to other screens would you indent them under the window manager?? or do you just list them all out unindented? i.e. WindowManager:
    First:
    a:
    b:
    Second:
    a:
    b:

  • @abdallahalmiski3988
    @abdallahalmiski3988 3 года назад

    how can I return 2 thing in my app like my widget and my builder

  • @gpowerturbo7887
    @gpowerturbo7887 2 года назад

    how i can modify time of transition from screen to other screen

  • @mariamkhanam4037
    @mariamkhanam4037 3 года назад

    How can I hide presplash screen in kivy??

  • @alexbggtt
    @alexbggtt Год назад

    Can someone help me? I copied to code exactly, but I get an error that says there’s no file “new_window.kv”

    • @Codemycom
      @Codemycom  Год назад

      sounds like you have no file named new_window.kv

  • @abdallahalmiski3988
    @abdallahalmiski3988 3 года назад

    how am I suppose to make my text black with no canvas

  • @borisbob
    @borisbob 2 года назад

    Best u are

  • @kendjinone830
    @kendjinone830 5 месяцев назад

    this only loads the kv code of the interface and not the .py that are linked to each interface

  • @navirobayo
    @navirobayo Год назад

    Amazing

  • @schlechtestergtaspielerdek3851

    I already had two Widgets, used as screens, doing what they should be doing. Now I used screen manager and transitions to be able to swap through them without changing my code XD. However, I have a slider in one Widget/Screen. Since I used the screen manager, this slider always shows the value I set it to AND the value 0. It has 2 pointers al of the time.
    I am also using 2 Buttons to increase or decrease a value, shown on the screen as a label. Since the Screenmanager, this label always shows the current value AND the value it had, when the program was started, so the default value. Both ontop of each other. If I change the screen back to a Widget, both slider and the "label value" function as they should. I googled a lot but cant find a solution. Can someone help me? :)

  • @advays9815
    @advays9815 3 года назад

    Can we do this multiple window thing with kivymd?

  • @manojsudarshana4377
    @manojsudarshana4377 2 года назад

    Hi there. Consistently getting
    Unknown class
    error. Please help

    • @Codemycom
      @Codemycom  2 года назад +1

      What did you do differently from the video?

    • @Angelina-hj4rh
      @Angelina-hj4rh 7 месяцев назад

      I might be too late but for those who are looking for the same problem: You have to define your classes (Pythonfile) BEFORE you reference your kv file via Builder. (Sry english is not my 1st language, hope you did understand)

  • @Hamheadon
    @Hamheadon 2 года назад

    How does one set it to give no transitions at all

  • @CodeWithJoe
    @CodeWithJoe 3 года назад

    how can i make this with swiping on a phone?

  • @Tawkitoutti
    @Tawkitoutti 3 года назад

    when do you do root.size vs root.width, root.height?

  • @abhaybairagi8300
    @abhaybairagi8300 3 года назад

    its appearing black window when using screen maneger in kivy

  • @ramitpanangat7855
    @ramitpanangat7855 3 года назад +2

    How to use id of a widget in one screen in second screen? eg. One screen has a Text Field and when write your name in that and enter submit, it should go to next screen where it shows your name write in text area.

    • @wat3rfall735
      @wat3rfall735 3 года назад

      you can use the root.manager.get_screen('screen_name').widget_id.parameter (like root.manager.get_screen('main_window').label.text) inside your .kv file

  • @viji8126
    @viji8126 3 года назад

    sir can you put a video on how to make the same in python tkinter ?

    • @Codemycom
      @Codemycom  3 года назад

      Hi, you would just use frames with tkinter.

  • @hiwab41
    @hiwab41 3 года назад

    Awesome!

  • @theh0lybrick
    @theh0lybrick 3 года назад

    can we do this by creating boxlayout in carousel

  • @weluvprogramming
    @weluvprogramming Год назад

    when are we getting the pop-up window

  • @mayangan_empire
    @mayangan_empire 3 года назад

    Thanks

  • @joshuaabbott5026
    @joshuaabbott5026 3 года назад

    Does anyone know how to set the current screen from within a on_press event, in the .py file? I need to check some conditions before allowing the user to go to the next screen, so I need to route from the .py and not the .kv

    • @sweeterdeeker9436
      @sweeterdeeker9436 2 года назад

      I am also looking for PY file commands on how to make multiple screens, pass data between those screens, JSON FILE?!?!, and how to make the screen be a boxlayout, or stacklayout and use a for loop to create a button, that is dynamic based on a list, etc.

  • @borneoviral6379
    @borneoviral6379 3 года назад

    Hey Bro... how do you skip the slide animation. I mean it still change from screen 1 to screen 2 by pressing the button.. but how to do it without the slide animation. Is theres a way to do that

    • @Codemycom
      @Codemycom  3 года назад

      sorry, not sure what you mean

    • @blakedexter1301
      @blakedexter1301 3 года назад +2

      To skip the sliding animation do this:
      Step1:
      First, import this in your kv file:
      #: import SlideTransition kivy.uix.screenmanager.SlideTransition
      Step2:
      Then add this line as the first line under the on_release event:
      app.root.transition = SlideTransition(duration = 0)
      Example:
      Button:
      text : 'Next Screen'
      font_size: 36
      on_release:
      app.root.transition = SlideTransition(duration = 0)
      app.root.current = 'second'
      Do this for both windows
      Also if you want to change the slide animation speed, use different values for duration instead of 0.

    • @kumaramit76
      @kumaramit76 3 года назад +1

      Hey it doesnt work for me it says unknow class name

  • @wardahambreen2493
    @wardahambreen2493 3 года назад

    sir please tell how to add functionality of passport size image for user in tkinter form

    • @Codemycom
      @Codemycom  3 года назад

      Sorry I don't know what passport size image is and this is not a tkinter playlist..my tkinter playlist has lots of videos on images and resizing images etc.

    • @wardahambreen2493
      @wardahambreen2493 3 года назад

      I am talking about the image of the scholarship form
      Which is on the top of the form where users upload there pic

    • @wardahambreen2493
      @wardahambreen2493 3 года назад

      _______________
      ! !
      ! UPLOAD. ! SCHOLARSHIP
      ! IMAGE. ! FORM
      ! !
      _______________
      NAME =
      AGE =
      CNIC NO. =
      ADDRESS=
      MOBILE NO. =
      etc
      Just like this

    • @Codemycom
      @Codemycom  3 года назад

      the scholarship form? lol I have no idea what you're talking about, but I have lots of videos on images on the playlist.

    • @wardahambreen2493
      @wardahambreen2493 3 года назад

      @@Codemycom ok

  • @1214loko
    @1214loko 2 года назад

    Someone knows if it's impossible to use MDButtons or other MD component inside a screen, is it possible to use just Button: ?

    • @Codemycom
      @Codemycom  2 года назад +3

      Of course, you can use any kind of button you want

  • @AliFGT
    @AliFGT 3 года назад

    can i make like this in tkinter without pack forget hack?

    • @Codemycom
      @Codemycom  3 года назад +2

      kivy is nothing like tkinter

  • @АнонАнонов-ы6о
    @АнонАнонов-ы6о Год назад

    0:00 Yo sup! :D

  • @videosincoming6850
    @videosincoming6850 3 года назад

    this code is not in ur github repo ??

    • @Codemycom
      @Codemycom  3 года назад

      of course it is

    • @videosincoming6850
      @videosincoming6850 3 года назад

      @@Codemycom ​ but there no link in the comments section or description...

    • @Codemycom
      @Codemycom  3 года назад +1

      @@videosincoming6850 Yes there is, the first pinned comment.

  • @kumaramit76
    @kumaramit76 3 года назад

    Not working

    • @Codemycom
      @Codemycom  3 года назад +1

      Then you did something wrong

    • @kumaramit76
      @kumaramit76 3 года назад

      @@Codemycom Yes i realized what i did wrong oops :P

  • @marciopataka6843
    @marciopataka6843 2 года назад

    Hi