How to please insert predefined name of INPUT items ?
My efforts: (info: the character "_" is cursor)
1 2 3 4 5 6 7
def Edit_Item(stdscr, item_name)
stdscr.addstr(1, 2, "Item Name:")
r = stdscr.getstr(2, 16, 15)
return r
Edit_Item(stdscr, 'Foo')
Edit_Item(stdscr, 'Bar')
Result:
1 2
Item Name: _
Item Name: _
The desired result:
1 2
Item Name: Foo_ # Foo must go edit
Item Name: Bar_ # Bar must go edit
1 2 3 4 5
- Call function 'Edit_Item' with parameter 'Foo' # OK
- The screen prints 'Item Name: Foo' # OK
- Cursor is now behind the word 'Foo_' # OK
- Press the key arrow left (2x) to change the cursor 'F_o' # Not work
- Edit word 'Foo' to 'Fao'