Forum Archive

Pythonista - Vertical scrolling

AlanEdwards

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

brumm

Here you can find an example with a scrollview including buttons.

PhoneManager


Important is to check these parameters

1) Mainview width (eg 320) height (eg 504)

2) Scrollview width (eg 320) height (eg 50) # buttons are only 50px high

3) Scrollview content width (eg 1088) content height (eg 50) # so you can place 17 buttons with 64px width

AlanEdwards

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.

brumm

Have you also seen the ui-tutorial?

AlanEdwards

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.