SetUsePopup (set UsePopup property)

Top  Previous  Next


SetUsePopup( usepopup )


Sets the value of the UsePopup property.


A BYTE value that sets the UsePopup property.


The SetUsePopup VIRTUAL method sets the value of the UsePopup property. When 1 (default), the popup menu associated with the target BrowseBox is diisplayed. When set to zero (0), the popup menu is disabled (not displayed) and the right-click action is ignored.


SetUsePopup sets the value of the PROTECTED UsePopup property. This method is set by the BrowseBox template, and called immediately following the BrowseClass Init method. The VIRTUAL method is normally used to test the value of the UsePopup property, and display a message notifying the user that the popup is enabled or disabled at open.


ThisWindow.Init PROCEDURE


ReturnValue          BYTE,AUTO




 SELF.Request = GlobalRequest                             ! Store the incoming request

 ReturnValue = PARENT.Init()

 IF ReturnValue THEN RETURN ReturnValue.

 SELF.FirstField = ?Browse:1

 SELF.VCRRequest &= VCRRequest

 SELF.Errors &= GlobalErrors                              ! Set this windows ErrorManager to the global ErrorManager


 CLEAR(GlobalRequest)                                     ! Clear GlobalRequest after storing locally


 IF SELF.Request = SelectRecord

    SELF.AddItem(?Close,RequestCancelled)                 ! Add the close control to the window manager


    SELF.AddItem(?Close,RequestCompleted)                 ! Add the close control to the window manager


 Relate:InvHist.Open                                      ! File InvHist used by this procedure, so make sure it's RelationManager is open

 SELF.FilesOpened = True

 BRW1.Init(?Browse:1,Queue:Browse:1.ViewPosition,BRW1::View:Browse,Queue:Browse:1,Relate:InvHist,SELF) ! Initialize the browse manager




See Also: UsePopup