Next / Previous / Contents / TCC Help System / NM Tech homepage

12.13. MenuBar.__cascadeViewing()

This cascade is slightly more involved because it has a second-level cascade in it.

huey
    def __cascadeViewing ( self, menu ):
        """Add the help cascade for viewing colors

          [ menu is a Menu widget ->
              menu  :=  menu with choices added for help topics
                        about viewing colors ]
        """

First we create a new cascade and add it to the parent menu.

huey
        #-- 1 --
        # [ menu    :=  menu with a new cascade added
        #   select  :=  that cascade ]
        select  =  Menu ( menu )
        menu.add_cascade ( menu=select,
            label="Viewing colors and fonts" )

There are only two subcomponents: help on the color swatch area, and the subcascade for font help. See Section 12.14, “MenuBar.__helpSwatch() and Section 12.15, “MenuBar.__cascadeFonts().

huey
        #-- 2 --
        # [ select  :=  select with a pop-up added about the
        #               color swatch ]
        select.add_command ( command=self.__helpSwatch,
            label="The color swatch" )

        #-- 3 --
        # [ select  :=  select with a cascade added for font help ]
        self.__cascadeFonts ( select )