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.
Flow layout container
-
here is a container class that implements a Layout manager similar to java FlowLayout. One of the frustrating parts of doing dynamic ui's on the fly in pythonista is the lack of layout managers. This is the first in a series to correct that.
A flow layout is similar to word wrapping, but for ui objects. As views are added usingadd_subview
, they are added to the right on the current row. When the end of the row is reached, objects get added to the next row. Row height is adjusted to the tallest item in a row.The view will resize automatically in width and height, if the appropriate flex settings are set, up to the parent view width.
It will reflow automatically when the size changes, such as when rotating orientation.The original purpose of this was to support a custom keyboard widget for the editor/debugger I'm working on. This will be used to layout the buttons, and also hold the temporary buttons that popup when doing a long tap.
I have a little demo/test code when running uicontainer as a script, see below.
![alt text][1]
[1]: http://i57.tinypic.com/n2kgtu.jpg screenshot
-
Awesome!
-
And now this is updated to include a pop up button class, and a simple implementation of a keyboard extension. I realize this is fruitless once omz releases the next pythonista version with keyboard widget... But in the meantime, it maybe useful to have an extended keyset for certain applications. I'm thinking ShellistaUI for example, or my eventual goal of a visual source debugger