omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    full_screen parameter in NavigationView not working for me

    Pythonista
    fullscreen navigationview
    2
    4
    612
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • seriph
      seriph last edited by

      My first posting. I am unable to use NavigationView in full_screen mode. Any guidance would be appreciated. Here is an example where I have changed the .present argument from hide_title_bar=True to 'full_screen' from an on-line example found here. Despite specifying full_screen, it still appears as an overlay in the middle portion of my screen.

      -Seriph

      import ui
      
      
      def make_button_item(action, image_name):
          return ui.ButtonItem(action=action, image=ui.Image.named(image_name))
      
      
      class NavView(ui.View):
          def __init__(self):
              root_view = ui.load_view()
              root_view.left_button_items = [
                  make_button_item(self.bt_close, "ionicons-close-24")
              ]
              root_view.right_button_items = [
                  make_button_item(self.bt_subview, "ionicons-arrow-right-b-24")
              ]
              self.nav_view = ui.NavigationView(root_view)
              self.nav_view.present('full_screen') # hide_title_bar=True)
              
          def bt_subview(self, sender):
              sub_view = ui.load_view("switchview1.pyui")
              sub_view.name = "subview"
              sub_view["btn_Okay"].action = self.bt_action
              sub_view["btn_Cancel"].action = self.bt_action
              self.nav_view.push_view(sub_view)
      
          def bt_close(self, sender):
              self.nav_view.close()
      
          def bt_action(self, sender):
              print("action from " + sender.name)
      
      
      NavView()
      
      cvp 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @seriph last edited by cvp

        @seriph try "fullscreen" without the underscore, see here

        1 Reply Last reply Reply Quote 0
        • seriph
          seriph last edited by

          @cvp Thank you. My program works now. Next time I will try the in-forum Search function rather that rely on an Internet search engine.

          cvp 1 Reply Last reply Reply Quote 0
          • cvp
            cvp @seriph last edited by

            @seriph thé search function of the forum is not very good, I personally use Google search but I search "Pythonista forum xxxx"

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB Forums | Contributors