User Tools

Site Tools


setusepopup_set_usepopup_property_.htm
Navigation:  ABC Library Reference > BrowseClass > BrowseClass Methods >====== SetUsePopup (set UsePopup property) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

SetUsePopup( usepopup )

blk2blue.jpg

SetUsePopup Sets the value of the UsePopup property.
usepopup 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.

Implementation:

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.

Example:

ThisWindow.Init PROCEDURE
ReturnValue          BYTE,AUTO
 CODE
 GlobalErrors.SetProcedureName('BrowseInvHist')
 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
 SELF.AddItem(Toolbar)
 CLEAR(GlobalRequest)                                     ! Clear GlobalRequest after storing locally
 CLEAR(GlobalResponse)
 IF SELF.Request = SelectRecord
    SELF.AddItem(?Close,RequestCancelled)                 ! Add the close control to the window manager
 ELSE
    SELF.AddItem(?Close,RequestCompleted)                 ! Add the close control to the window manager
 END
 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
 BRW1.SetUsePopup(False)
 SELF.Open(QuickWindow)

See Also: UsePopup

setusepopup_set_usepopup_property_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1