WPCubed Product Support

WPPrvFrm - how to disable buttons?

The WPPrvFrm does not appear to honor the DisabledButtons property. I looked at the code and it does not do anything with those settings, nor do I see the actual button objects, only the OnClick events for them. So I'm not sure how to modify the form to hide the save, print etc buttons.

#1 ♥ 0
3.1k Views 2 users read 1 min
wpsupport

I see, there was something planned ....

This code in Execute will fix the problem.

dia.ToolBar.sel_ActionIcons := [SelSave, SelPrint, SelPrintSetup];

if wpprvPrint in FDisabledButtons then

dia.ToolBar.sel_ActionIcons := dia.ToolBar.sel_ActionIcons - [SelPrint];

if wpprvPrintDialog in FDisabledButtons then

dia.ToolBar.sel_ActionIcons := dia.ToolBar.sel_ActionIcons - [SelPrintSetup];

if wpprvSaveAs in FDisabledButtons then

dia.ToolBar.sel_ActionIcons := dia.ToolBar.sel_ActionIcons - [SelSave];

#2 ♥ 0
This category is archived. No new posts are possible.