Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Print button on preview toolbar
Message
From
24/01/2005 06:53:50
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turkey
 
 
To
18/01/2005 10:23:47
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
00977969
Message ID:
00979955
Views:
36
Hi Doug,

Relative in this thread; In VFP9 can I change print toolbar's button's captions without recompile toolbar applications sources?

>>How to disable print button on report preview toolbar in VFP9?
>
>In VFP 9, you have a lot more control over the appearance and behavior of the preview window and toolbar because they're VFP classes. The following code, taken from Chapter 7 of the upcoming What's New in Nine (available from Hentzenwerke Publishing), shows an example. The ExtenstionHandler class is needed to remove the Print function from the shortcut menu; otherwise, the Print button would be removed by setting its Visible to .F. but the user could still choose Print from the shortcut menu.
>
>
loListener = createobject('ReportListener')
>report form MyReport preview object loListener nowait
>loExtension = createobject('ExtensionHandler')
>loListener.PreviewContainer.SetExtensionHandler(loExtension)
>loListener.PreviewContainer.oForm.Toolbar.cmdPrint.Visible = .F.
>
>define class ExtensionHandler as Custom
>  function AddBarsToMenu(tcMenu, tnNextBar)
>    release bar 12 of &tcMenu
>  endfunc
>
>  function Release
>    if type('This.PreviewForm') = 'O'
>      This.PreviewForm.ExtensionHandler = .NULL.
>      This.PreviewForm = .NULL.
>    endif type('This.PreviewForm') = 'O'
>  endfunc
>
>  function Show(tnStyle)
>  endfunc
>
>  function Paint
>  endfunc
>
>  function HandleKeyPress(tnKeyCode, tnShiftAltCtrl)
>  endfunc
>enddefine
>
>Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform