Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TabIndex for members and children of a layout

    SmartClient Version: v9.1p_2016-04-15/Pro Development Only (built 2016-04-15)
    Google Chrome Version 43.0.2357.125 unknown (64-bit) (any browser)

    We have a layout that contain 2 components added as a member. We have another component added to the same layout but as a child. When tabbing through these components in the layout, the component added as a child was not focused as expected. Is it possible to set it up such that the component added as a child would be focused after tabbing out of the last component added as a member? For example, could we modify the tabIndex of the child so that it continues from the last member of the layout?

    Using the result of the code below:
    - If you start tabbing from "Member 1", it will focus "Member 2". This successfully happens.
    - If you press tab from "Member 2", it will not focus "Child 3" because it is not added as a member.

    Code:
    isc.VLayout.create({
        ID: "container",
        members: [
            isc.HStack.create({
                ID: "stack",
                members: [
                    isc.Button.create({
                        title: "Member 1"
                    }), isc.Button.create({
                        title: "Member 2"
                    })
                ]
            })
        ]
    });
    
    container.addChild(isc.Button.create({
        left: 200,
        title: "Child 3"
    }));

    #2
    Layouts don't currently incorporate non-member children into the tabbing order. If non-member children were to be incorporated into the tab order, there's a lot of ambiguity around how they should be slotted in (always last? always first? relative to when they were added? etc..).

    The quickest way to solve this problem is to have a Canvas that has the "container" VLayout and the non-member child as children (siblings of each other). However we wouldn't recommend using this additional nesting if this is a recurring pattern that is going to come up in your application a lot - is it?

    Comment

    Working...
    X