Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-816

Add "setSelectedTab(Component)" method to TabPane to facilitate selecting tabs programmatically

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.1
    • Component/s: wtk
    • Labels:
    • Environment:
      Windows XP SP3, JDK 1.6.0_16

      Description

      There is already a "setSelectedIndex", "getSelectedIndex" and "getSelectedTab" methods. It would be nice and orthogonal to have a "setSelectedTab" method also.

      My use case is this: I have TabPane components identified by bxml:id in my main layout file, and references to these components in the .java code. So, rather than relying on indexes to programmatically select a tab (which might change if I reorder the tabs), if I could just use the tab component itself (since I have a reference to it) to make the selection, then it would be more reliable.

        Attachments

        1. tab.patch
          0.8 kB
          Roger Whitcomb

          Activity

            People

            • Assignee:
              rwhitcomb Roger Whitcomb
              Reporter:
              rwhitcomb Roger Whitcomb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified