Been traveling - Out of office the past couple weeks :o)
you will need to supply the correct info for <your form info here> in 4 places.....
Disabling standard tools:
Add as custom assembly; Infragistics2.Win.UltraWinToolbars.v6.3.dll
Add near top of module script;
Imports System.Reflection
Imports System.Collections
Module Script
'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **
'// End Wizard Added Module Level Variables **
'// Add Custom Module Level Variables Here **
dim tools As Infragistics.Win.UltraWinToolbars.UltraToolbarsManager
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization
'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls
dim obj As Object = GetType(<your form info here>).InvokeMember("baseToolbarsManager",BindingFlags.Instance Or BindingFlags.GetField Or BindingFlags.NonPublic, Nothing, <your form info here>, Nothing)
tools = CType(obj,Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)
'// End Custom Method Calls
End Sub
Private Sub <your form info here>_Load(ByVal sender As object, ByVal args As EventArgs) Handles <your form info here>.Load
'//
'// Add Event Handler Code
'//
tools.Tools("CopyTool").SharedProps.Enabled = false
tools.Tools("CutTool").SharedProps.Enabled = false
tools.Tools("PasteTool").SharedProps.Enabled = false
End Sub
Context menus on grids are a whole different animal. They are built as you right click on the grid and are a specialized version of a Infragistics popup tool that is contained within the Epicor.Mfg.UI.EpiClientLib - The grids also have the standard windows context menu and context menu strip, but they are not used. I have found that if you set the Enabled property of the EpiUltraGrid to false then the context menu does not contain the copy, select options....
So the code for that would be:
Private Sub DisableEpiUltraGrids(Optional ByRef ctls As System.Windows.Forms.Control.ControlCollection = Nothing)
' Enumerate the forms controls
If ctls Is Nothing Then ctls = oTrans.EpiBaseForm.Controls
For Each ctl As Control In ctls
If ctl.HasChildren Then DisableEpiUltraGrids(ctl.Controls)
If TypeOf(ctl) Is EpiUltraGrid Then
ctl.Enabled = false
End If
Next
End Sub
Add DisableEpiUltraGrids() to the formLoad event....
Good Luck.
you will need to supply the correct info for <your form info here> in 4 places.....
Disabling standard tools:
Add as custom assembly; Infragistics2.Win.UltraWinToolbars.v6.3.dll
Add near top of module script;
Imports System.Reflection
Imports System.Collections
Module Script
'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **
'// End Wizard Added Module Level Variables **
'// Add Custom Module Level Variables Here **
dim tools As Infragistics.Win.UltraWinToolbars.UltraToolbarsManager
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Intialization' lines **
'// Begin Wizard Added Variable Intialization
'// End Wizard Added Variable Intialization
'// Begin Custom Method Calls
dim obj As Object = GetType(<your form info here>).InvokeMember("baseToolbarsManager",BindingFlags.Instance Or BindingFlags.GetField Or BindingFlags.NonPublic, Nothing, <your form info here>, Nothing)
tools = CType(obj,Infragistics.Win.UltraWinToolbars.UltraToolbarsManager)
'// End Custom Method Calls
End Sub
Private Sub <your form info here>_Load(ByVal sender As object, ByVal args As EventArgs) Handles <your form info here>.Load
'//
'// Add Event Handler Code
'//
tools.Tools("CopyTool").SharedProps.Enabled = false
tools.Tools("CutTool").SharedProps.Enabled = false
tools.Tools("PasteTool").SharedProps.Enabled = false
End Sub
Context menus on grids are a whole different animal. They are built as you right click on the grid and are a specialized version of a Infragistics popup tool that is contained within the Epicor.Mfg.UI.EpiClientLib - The grids also have the standard windows context menu and context menu strip, but they are not used. I have found that if you set the Enabled property of the EpiUltraGrid to false then the context menu does not contain the copy, select options....
So the code for that would be:
Private Sub DisableEpiUltraGrids(Optional ByRef ctls As System.Windows.Forms.Control.ControlCollection = Nothing)
' Enumerate the forms controls
If ctls Is Nothing Then ctls = oTrans.EpiBaseForm.Controls
For Each ctl As Control In ctls
If ctl.HasChildren Then DisableEpiUltraGrids(ctl.Controls)
If TypeOf(ctl) Is EpiUltraGrid Then
ctl.Enabled = false
End If
Next
End Sub
Add DisableEpiUltraGrids() to the formLoad event....
Good Luck.
--- In vantage@yahoogroups.com, Chris Thompson <chriselectrix@...> wrote:
>
> Looking at the bottom of this thread, I have a couple of issues that you may be able to solve.
>
> Firstly, having the Delete button next to the Save button on the standard tool bar seems crazy.
>
> Does anyone know a way they can be re-ordered?
>
>
> Also, does anyone know a way I can remove the cut/copy/paste buttons from the toolbar?
>
> If you can add buttons, presumably you can remove them?
>
> If so, how?
>
> Cheers,
>
>
> CHRIS THOMPSON
>
>
>
>
> ________________________________
> From: brychanwilliams <brychanwilliams@...>
> To: vantage@yahoogroups.com
> Sent: Friday, 29 May, 2009 13:27:10
> Subject: [Vantage] Re: Customization Capture Print button event on order entry
>
>
>
>
>
> Hi,
>
> Managed to work it out.... but needed to tie to any event in this getting the project ID
>
> Used pop.InstanceProps. Visible = false
>
> --- In vantage@yahoogroups .com, "brychanwilliams" <brychanwilliams@ ...> wrote:
> >
> > Hi,
> >
> > The problem I have is that I want security linked to the a project manager of a project, so only the project manager can make changes. So at any one time there are 20 active projects and theory there could be 20 different project managers. So at the moment I can do the following;
> >
> > 1) Enable / Disable controls/dataviews depending on the user
> > 2) I can throw exceptions to stop any projects being created and deleted. The actual projects are step up by other people.
> > 3) I just need to stop the actions menu options in the project entry. I suppose I could look at throwing exceptions but it would be neater just to make the actions menu disappear... .
> >
> > I thought the below code could point me in the right direction but I am not the best at coding .
> >
> >
> >
> >
> > --- In vantage@yahoogroups .com, "Bruce Larson" <epicor@> wrote:
> > >
> > > In the security menu you can select the processes to disable for various
> > > users.
> > > Turning off the whole Action menu, not sure if you can do that.
> > >
> > > Bruce
> > > Bruce@
> > > www.ERPgeek. com
> > >
> > >
> > > -----Original Message-----
> > > From: vantage@yahoogroups .com [mailto:vantage@yahoogroups .com] On Behalf Of
> > > brychanwilliams
> > > Sent: Thursday, May 28, 2009 11:21 AM
> > > To: vantage@yahoogroups .com
> > > Subject: [Vantage] Re: Customization Capture Print button event on order
> > > entry
> > >
> > > Hi,
> > >
> > > I was wondering if you could help me out. I am customising the project entry
> > > screen and I need to disable the actions menu. I have tried some syntaxes
> > > but just can't seem to get it to work.
> > >
> > > Thanks
> > >
> > >
> > > --- In vantage@yahoogroups .com, "bw2868bond" <bwalker@> wrote:
> > > >
> > > > Thanks for the update. I am happy you got it to work
> > > >
> > > > In the UI, there is one event handler that captures the click of any of
> > > the 'tools' in a group designated 'misc' tools.
> > > >
> > > > There is a big long Select Case statement that then performs the actions
> > > depending on the tool (button) that was clicked. Many of them call the form
> > > update method, but for whatever reason the two different print tools did
> > > not....
> > > >
> > > > It would be a easy (one line of code) fix for Epicor to implement if
> > > anyone was to report it
> > > >
> > > > --- In vantage@yahoogroups .com, "Ben Hunsberger" <ben@> wrote:
> > > > >
> > > > > Thanks a lot.
> > > > >
> > > > > I was able to get everything to look good except the print button
> > > wouldn't show on the tool bar.
> > > > >
> > > > > With some experimenting I found out the button needed to not only be
> > > added to the list of buttons managed by the "tool bar manager" but also the
> > > instance of the toolbar being used:
> > > > >
> > > > > Tools.Toolbars( "Standard Tools").Tools. Add(printButton)
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > > ------------ --------- --------- ------
> > >
> > > Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
> > > already linked your email address to a yahoo id to enable access. )
> > > (1) To access the Files Section of our Yahoo!Group for Report Builder and
> > > Crystal Reports and other 'goodies', please goto:
> > > http://groups. yahoo.com/ group/vantage/ files/.
> > > (2) To search through old msg's goto:
> > > http://groups. yahoo.com/ group/vantage/ messages
> > > (3) To view links to Vendors that provide Vantage services goto:
> > > http://groups. yahoo.com/ group/vantage/ linksYahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>