Search This Blog

Tuesday, July 16, 2013

Skipping tab stop for disabled/readonly editors and columns

I've recently refactored (for XAF 13.2) the WinPropertyEditor, DXPropertyEditor and a few descendants to provide a common code for updating the control's availability (technically the System.Windows.Forms.Control.Enabled property) and also added support for skipping tab stop if the control is disabled. Check out the video below to see how it works in action (take special note that the FullName property is readonly):

Unable to display content. Adobe Flash is required.




Just for this video, I temporarily enabled highlighting of the focused item in the layout control so that you could better see how the focus moves in the form.

This task is not yet finished, and I have a few questions for you:

1. Do you want to skip tab stop for readonly editors and columns by default in XAF?

2. Do you want to control this behavior via the Model Editor on the DetailView or application levels or may be controlling this in code would be sufficient)?


Your feedback is needed!
Personally, I think that #1 can be the default behavior, because I believe this is what the majority of users expects, but still wanted to hear from you as your end-users may have different preferences.

As for #2, I am a bit hesitant about providing a new option in the Application Model for each DetailView node. I think that it can be globally disabled somewhere under the Options | LayoutManager, though.

Thanks for your input in this regard!


P.S.
This behavior already presents in ASP.NET apps by default, so that we do not need write any code for this.

3 comments:

  1. #1 Skip readonly editors by default, yes
    #2 Global options sounds fine

    It would also be nice if ASP.NET would have an option to skip New and Delete buttons on LookupEditors. User expect to go to next editor on tab and then it gets confused when focus goes to those buttons.
    If some user want current behaviour, maybe this as well could be controlled with global option.

    ReplyDelete
  2. Agree about New and Delete buttons in ASP.NET. I solved this with controller, but it would be nice if it could be controlled by global option.

    ReplyDelete