Skip to content

Add TabVisible property so that tabs can be hidden completely rather than just disabled #140

Description

@GrahamNZ

It's great to see FPgui come back to life! Thank you Graeme.

One of the changes I made to my copy of 1.4.1 was to add TabVisible as a boolean property to TfpgTabSheet so that tabs can be completely hidden. My code isn't very good as I got confused about how the left and right margins worked so I won't try to upload it as a pull request (not that I know how to, anyway!), but it seems to work for me. Basically all the loops with

        while h <> nil do
        begin
           ....
        end; 

become

        while h <> nil do
        begin
          if h.TabVisible
          then
             ....
          end;
       end;

but, as I said, this changes how the margins are incremented too.

It would be great if this was added to the official release.

I know some people think tabs should only be disabled as part of a UI and not removed when not needed but there are times when I think this option makes a screen much clearer.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions