parameters: (self, event)
docstring: Handles the ``wx.EVT_CAPTIONBAR`` event for :class:`CaptionBar`.
  
          :param `event`: a :class:`CaptionBarEvent` event to be processed.
docstring_summary: Handles the ``wx.EVT_CAPTIONBAR`` event for :class:`CaptionBar`.
docstring_tokens: Handles the wx . EVT_CAPTIONBAR event for : class : CaptionBar .
function: def OnPressCaption(self, event):
          """
          Handles the ``wx.EVT_CAPTIONBAR`` event for :class:`CaptionBar`.
  
          :param `event`: a :class:`CaptionBarEvent` event to be processed.
          """
  
          # act upon the folding or expanding status of the bar
          # to expand or collapse the panel(s)
  
          if event.GetFoldStatus():
              self.Collapse(event.GetTag())
          else:
              self.Expand(event.GetTag())
function_tokens: def OnPressCaption ( self , event ) : # act upon the folding or expanding status of the bar # to expand or collapse the panel(s) if event . GetFoldStatus ( ) : self . Collapse ( event . GetTag ( ) ) else : self . Expand ( event . GetTag ( ) )