Hi,
While testing FWH19.03+Bcc7.3+Harbour, I found out if I click the email button at print preview it will cause my exe to silently terminate.
Is there a neat way for me to remove this button without having to customized rpreview.prg for all of my reports?
TIA
The neatest way to remove email button from TPreview
The neatest way to remove email button from TPreview
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: The neatest way to remove email button from TPreview
We can not remove the button without altering the program.
But it is possible to assign a dummy action or an alternative action to this button which may serve your purpose.
At the outset of your main function
or
This should solve your problem.
But it is possible to assign a dummy action or an alternative action to this button which may serve your purpose.
At the outset of your main function
Code: Select all
Tpreview():bEMail := { || MsgInfo( "not implemented" ) }
Code: Select all
Tpreview():bEMail := { || nil ) }
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: The neatest way to remove email button from TPreview
Thanks Rao.
I guess I'll have to go with customizing rpreview.prg route as customers are bound to complain if something is there but they can't use it.
Hope inf future rpreview will be enhanced so that programmer can pick what button is to be shown.
Maybe by passing TPreview():aBtnsShow := {.t., .t., .f. ......} or something similar
I guess I'll have to go with customizing rpreview.prg route as customers are bound to complain if something is there but they can't use it.
Hope inf future rpreview will be enhanced so that programmer can pick what button is to be shown.
Maybe by passing TPreview():aBtnsShow := {.t., .t., .f. ......} or something similar
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: The neatest way to remove email button from TPreview
1) None of us have seen a program crash by pressing email button. We are hearing this for the first time in all these years.
2) You have a far better option. You can define your own buttonbar instead of the default buttonbar.
TPreview():bButtonBar := { |oPreview, oWnd| YourButtonBar( oPreview, oWnd ) }
Highest flexibility to customize.
2) You have a far better option. You can define your own buttonbar instead of the default buttonbar.
TPreview():bButtonBar := { |oPreview, oWnd| YourButtonBar( oPreview, oWnd ) }
Highest flexibility to customize.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: The neatest way to remove email button from TPreview
New CLASSDATA bSetup is provided in class Tpreview in FWH 1904.
This removes the Email button from the bar.
Code: Select all
RPrevUserBtns( nil, 2007 )
TPreview():bSetup := <|oPreview, oWnd|
WITH OBJECT oWnd:oBar
:aControls[ 10 ]:End()
ADel( :aControls, 10, .t. )
:BtnAdjust()
END
return nil
>
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: The neatest way to remove email button from TPreview
Yeah. Could be something in my development environment that's causing it. Unable to pinpoint the cause so farnageswaragunupudi wrote:1) None of us have seen a program crash by pressing email button. We are hearing this for the first time in all these years.
Cool! Way-way neater than what I had in mind. Thanks a bunch Raonageswaragunupudi wrote:New CLASSDATA bSetup is provided in class Tpreview in FWH 1904.Code: Select all
RPrevUserBtns( nil, 2007 ) TPreview():bSetup := <|oPreview, oWnd| WITH OBJECT oWnd:oBar :aControls[ 10 ]:End() ADel( :aControls, 10, .t. ) :BtnAdjust() END return nil >
Where do I place the code? At every report or just need to call them once from the main prg?
FWH 11.08/FWH 19.03
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
xHarbour 1.2.1 (Rev 6406) + BCC
Harbour 3.1 (Rev 17062) + BCC
Harbour 3.2.0dev (r1904111533) + BCC
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: The neatest way to remove email button from TPreview
Call it once in the main program.Where do I place the code? At every report or just need to call them once from the main prg?
You can also make any other changes you consider appropriate.
Note: This is from FWH1904 to be released soon.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India