Skip to content

Commit 2bf63d1

Browse files
automatically focus text boxes
1 parent 3a048c5 commit 2bf63d1

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/views/check_in_manual.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ def _build(self, controller):
6767
btn_row.addStretch()
6868
inner.addLayout(btn_row)
6969

70+
def on_show(self):
71+
self.pid_entry.setFocus()
72+
7073
def on_hide(self):
7174
self.pid_entry.clearFocus()
7275

src/views/create_account_manual.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def _build(self, controller):
6565
no_pid_row.addStretch()
6666
inner.addLayout(no_pid_row)
6767

68+
def on_show(self):
69+
self.pid_entry.setFocus()
70+
6871
def on_hide(self):
6972
self.pid_entry.clearFocus()
7073

src/views/create_account_no_pid.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ def _field_row(label_text):
6161
btn_row.addStretch()
6262
inner.addLayout(btn_row)
6363

64+
def on_show(self):
65+
self.first_name_entry.setFocus()
66+
6467
def on_hide(self):
6568
for entry in (self.first_name_entry, self.last_name_entry, self.email_entry):
6669
entry.clearFocus()

src/views/create_account_review.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ def setup(self, first_name="", last_name="", email="", pid="", pid_locked=False)
7474
self.pid_entry.setText(pid)
7575
self.pid_entry.set_readonly(pid_locked)
7676

77+
def on_show(self):
78+
self.first_name_entry.setFocus()
79+
7780
def on_hide(self):
7881
for entry in (self.first_name_entry, self.last_name_entry,
7982
self.email_entry, self.pid_entry):

0 commit comments

Comments
 (0)