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.
Make interface using design tool and edit it by script (add some ui elements). Is it possible?
-
I'll think about tableView. Thanks. But it will be later..
I touch the button, but nothing was heppend(.
"action_butt" execute..# coding: utf-8 import ui def action_butt(sender): v=sender.superview myScrollView=v['scrollview1'] butt = ui.Button(title='test') myScrollView.add_subview(butt) v=ui.load_view('Untitled 5') v.present()
I need to understend the principle of work with views..
-
@cg-mag, it looks ok to me what you did. But look in ui designer and make sure you have the correct names. And also that you action field in the btn is just
action_butt
Nothing else -
@Phuket2, Yes I have correct names.
photos below.
http://cs621927.vk.me/v621927381/398fc/AilzRGS9vNA.jpg
http://cs621927.vk.me/v621927381/39905/ZCm19WhP38U.jpg
It is a simple scene. Where can i mistake?(( -
@cg-mag , what is the 'No Name' control on the picture? Is your scrollview1 at the front? I mean object layering? You have a menu to move to the front and back. Also is your scrollview apart if a subview in the form?
From your pics it looks correct to me. But, you are right, you really need to understand views. Might be time to take a step back and read about them in the included documentation.
It's the most fundamental thing you need to understand.
Let's say you scrollview is a subview of customview on the form called mycustomview. Then when you reference it you would need to do something likev = sender.superview
scrollview = v['mycustomview']['scrollview1']Sorry, I am trying to help, for me it's not clear what your problem is
-
No Name - it is not control. It is standart title... Scroll view I move to back. There obly 2 objects - scroll view and buuuton. All in the center with standart sizes.
Action from button have executed and I can change with this action for example content_size, but I can not add button!
I can change in scrollView anything, but can`t add new ui element -
Maybe start a new project. Only put the scrollview and the button on the form. Maybe something will show up clearly
-
You are also right, it's a very easy example. So just start from scratch to be sure
-
I start new script and do this. I have the same
-
Ok, maybe I didn't see in the code version. Change the content size in the ui designer. Make the width and height the size of your screen.
-
Thank you a lot! Problem was in that - button was created but in left upper conner - very high. I move scroll view down and now all works right!!
Now I have new questions) - can i add 2 ui.label in each raw in table view? -
@cg-mag , yes you can create ui.Labels in your ui.TableViews. But it has default ui.Labels built in already. You can do so much with ui.TableView, but it's worth the time reading first, it will save you a lot of time. It looks more difficult than it is.
Hard for me to reply fast at the moment. Floods every where and electric on and off. 3G is really bad. Maybe many people using it.
-
Thank you).
-
@cg-mag, no problems. I have been working on a menu creating program for my friend. I haven't done much, but from the screenshot below you can see you can do a lot with the TableView.
Worth learning.