Skip to content

Comments

Milky/gui state#12

Open
milkmanmatty wants to merge 3 commits intoMHeasell:masterfrom
milkmanmatty:milky/gui-state
Open

Milky/gui state#12
milkmanmatty wants to merge 3 commits intoMHeasell:masterfrom
milkmanmatty:milky/gui-state

Conversation

@milkmanmatty
Copy link

Track which type of tab is selected in the sidebarTabs of MainForm.

This allows for better tracking of GUI's internal state - which in turns allows for better functionality based on the user's selection. This is a precursor branch for Feature bandbox selection.

There are many ways to do this and it ultimately came down to which variety of tight coupling to take:

  1. Record the selected tab index, as the index can be used as a unique identifier. Changing the order of the tabs would then break the functionality. Least complex.
  2. Record the selected tab name. Possibility of duplicate tab names, while not immediately breaking - might have some run-time exceptions further down the line. Changing the names of any tabs will break the functionality. Also rather simple.
  3. Create a custom extended TabPage that can have a readonly property set at constructor time that holds the tab type. Possibly need a custom TabControl and TabPageCollection to ensure existing tab functionality is unchanged. Adding a new tab would break the functionality. Most complex.

This PR implements option 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant