Setting a textfield to readonly breaks the tab-order.

feedback://showreport?report_id=36595

Setting a textfield to readonly breaks the tab-order (Sample project attached to feedback case).

  1. Add 4 textfields to a new project
  2. Set the 3rd textfield to readonly
  3. run the project and hit tab-key to forward focus from field to field
  4. Note that focus cannot advance beyond the readonly field
  5. Not that when the field is set to readonly=false, then focus advances as expected

Expected Result:
focus advances to the next field in taborder

Actual Result:
focus jumps back to the first field in taborder

Tested and confirmed here too.

[quote=142431:@Oliver Osswald]feedback://showreport?report_id=36595

Setting a textfield to readonly breaks the tab-order (Sample project attached to feedback case).

  1. Add 4 textfields to a new project
  2. Set the 3rd textfield to readonly
  3. run the project and hit tab-key to forward focus from field to field
  4. Note that focus cannot advance beyond the readonly field
  5. Not that when the field is set to readonly=false, then focus advances as expected

Expected Result:
focus advances to the next field in taborder

Actual Result:
focus jumps back to the first field in taborder[/quote]

You want to set TextField3.TabStop to False when you set ReadOnly to True, and the problem no longer manifests.

Maybe that should be automatic ?

[quote=142447:@Michel Bujardet]You want to set TextField3.TabStop to False when you set ReadOnly to True, and the problem no longer manifests.

Maybe that should be automatic ?[/quote]
Ah, I was not aware of this one. Thanks a lot!

Now I added a computed property ‘ReadOnly’ to my subclassed textfield and the setter method goes like this:

Set mReadOnly = value TextField(Me).ReadOnly = value Me.TabStop=Not value End Set

Now this seems to work as expected.