Stopping focus moving to controls

#1

If a field is set to not be editable, it should not be able to receive the focus, otherwise it can lead to confusion for users who think that because it gets the focus they should be able to change it.

1 Like

#2

As a workaround I’ve put the following code in the focusGained event of the control I don’t want to receive the focus:

if event.oppositeComponent.name == "previousControlName":
	event.source.transferFocus()
elif event.oppositeComponent.name == "followingControlName":
	event.source.transferFocusBackward()
0 Likes