omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. a9wtPrLyjKTbNH0

    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.


    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    a9wtPrLyjKTbNH0

    @a9wtPrLyjKTbNH0

    0
    Reputation
    246
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    a9wtPrLyjKTbNH0 Unfollow Follow

    Latest posts made by a9wtPrLyjKTbNH0

    • RE: How to import all elements from a pyui file into a finished project?

      Thank you very much for your help, now everything works as it should!

      posted in Pythonista
      a9wtPrLyjKTbNH0
      a9wtPrLyjKTbNH0
    • RE: How to import all elements from a pyui file into a finished project?

      My pyui file consists of the ImageView, Label, and Button elements and looks like the picture shows https://yadi.sk/i/dInihQdX7j_Ajg. I need to import all the elements from a file and put them in the ui. ScrollView() of my project instead of the button with the text "hello world". Can you tell me how to do this?

      posted in Pythonista
      a9wtPrLyjKTbNH0
      a9wtPrLyjKTbNH0
    • How to import all elements from a pyui file into a finished project?

      Hello, please tell me how to import a purchase card from a pyui file and place it instead of a button with the text " hello world"?

      Program code:

      import ui
      from objc_util import *
      
      @on_main_thread
      class MyTextViewDelegate (object):
          def textview_did_change(textview):
              tvo = ObjCInstance(textview)
              cgs = tvo.sizeThatFits_(CGSize(textview.width,2000))
              textview.height = cgs.height
              sv = textview.superview
              sv.content_size = (sv.width,sv['iv'].height+textview.height+204)
      
      sv = ui.ScrollView()
      sv.frame = (0,0,400,600)
      sv.background_color = 'white'
      iv = ui.ImageView(name='iv')
      iv.frame = (0,0,sv.width,200)
      iv.image = ui.Image.named('test:Peppers')
      sv.add_subview(iv)
      
      button = ui.Button()
      button.title = "hello world"
      button.frame = (2,iv.height+50,sv.width-4,100)
      button.border_width = 1
      button.border_color = 'blue'
      button.corner_radius = 5
      sv.add_subview(button)
      
      tv = ui.TextView()
      tv.delegate = MyTextViewDelegate
      tv.frame = (2,iv.height+200,sv.width-4,100)
      tv.border_width = 1             # only to show height automatically varying
      tv.border_color = 'blue'
      tv.corner_radius = 5
      tv.text = 'a\n'*40
      sv.add_subview(tv)
      tv.delegate.textview_did_change(tv) # only to compute initial height
      sv.present('sheet')
      
      posted in Pythonista
      a9wtPrLyjKTbNH0
      a9wtPrLyjKTbNH0
    • RE: How do I scroll all content in scrollview?

      Just what me need, thank you for your help.
      You can't tell me how to make a TextView dynamically change its height so that the textview itself changes its height from the text written in it.

      posted in Pythonista
      a9wtPrLyjKTbNH0
      a9wtPrLyjKTbNH0
    • How do I scroll all content in scrollview?

      Hello, can you tell me how to make it possible to add imageview and textview to scrollview. textview should change dynamically from the text placed in it. You need to make sure that when scrolling, all the content(text and image) is scrolled, not just the text.

      posted in Pythonista
      a9wtPrLyjKTbNH0
      a9wtPrLyjKTbNH0