Is it possible to print WYSIWYG? I can take a screen grab of a populated PYUI and can then print it from iPad Photos app but I wondered if i could save a few touches and print directly from the Pyhtonista app?
Thanks,
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.
Latest posts made by AlanEdwards
-
Print a PYUI?
-
RE: Pythonista - Vertical scrolling
I had a week or so ago, but did not know then what my head-scratchers were going to be. I'll revisit it. Thanks.
-
Pythonista - Vertical scrolling
Please may I reach out again?, this time for help on scrolling. I have created a PYUI which looks like a spreadsheet created of rows of separate text fields, and action buttons which act upon the text fields in their row.
I might need to have more rows than are visible on a iPad screen so I had hoped to discover how to add a Scroll View from the PYUI library and position it so my overset rows could be scrolled into view. But obviously I have failed.
Has anyone a simple example they could share with me please?
Thanks again.
Alan
-
RE: Pythonista - Vertical scrolling
Thank you brumm,
Being an absolute beginner I drowned in that code but I shall persist with it. I figured out how to add a scrollview, and then add items to the subview of that soon after my OP, so slow progress is being made.
-
A constantly updating PYUI
Hi again,
On the second phase of my personal project I hope to be able to create a sequence clock, my example is a PYUI with two items - a field for a constantly running digital clock, and a start button. Eventually the screen will have different events announced on screen as their time approaches.
But as you may have guessed the clock only updates on each press of the button. Can anyone steer me? I'm hoping it is a quick fix, I can't get my head around .self.
Thanks, Alan
import ui import time def startSequence(sender): for loop in range(1,3): # a test number currentTime=time.localtime(time.time()) v['masterClock'].text=time.strftime("%H:%M:%S",currentTime) # view of the UI is called here v = ui.load_view('Sequence Timer') v.present(orientations=['landscape'])
-
RE: A constantly updating PYUI
Thanks Phuket2, the example JonB sent me worked straight out of the box, and I am sure yours would too, and if I may I will put it in my toolbox for later.
I learnt a hard-lesson on quoting code on this forum too –
It has to be three ticks, then on a new line 'python', then a blank line. Then finish with three more ticks.
Now can you help me on PYUI scrolling? I have a spreadsheet type view designed in the PYUI for the iPad consisting of rows and columns of individual textfields and action buttons, but do I have a clue if it can be made to scroll? No I do not.
-
RE: A constantly updating PYUI
Thanks JonB, that last example from the link is exactly what I had hoped to have written, and more importantly it is written in a way I should be able to understand, not using those unfathomable classes or selfs. Love it.
-
RE: Struggling to UI a grid of fields
Wow, thanks. A simple as that, and no doubt after a lot of experience on your part. Thanks.
-
Struggling to UI a grid of fields
Hello all, totally new to Python and Pythonista although I do have experience of AppleScript.
First up kudos to Ole, fantastic app.
Second up is my head scratcher. I'm trying to create a UI with a grid of uniquely identifiable text fields. I don't think I can use a PYUI as I need a running digital clock on the screen at the same time, so I figured I would need to create the UI screen in the code.
My code to make the first column makes a text box for each iteration through the loop but only the last one displays. What can I add/change to get the earlier ones to display?
Thanks, Alan
import ui
def fieldEdited(sender):
t=view[fieldName].text
print tfor loop in range(1,11):
fieldName='field' + str(loop)view = ui.View() view.background_color = 'white' field = ui.TextField() field.name='field'+str(loop) field.text= fieldName field.center = (70,(90+loop*30)) field.height=27 field.width=82 field.action = fieldEdited
view.add_subview(field)
view.present(style='full_screen',hide_title_bar='True')
-
RE: Struggling to UI a grid of fields
Thank you ccc, who would have thought I could make such a mess of it?
Now can anybody solve my original problem, it's a long way back.