I just realize my mistake.
I didn't change the checkbox06 to checkbox01.
Sorry
Ephraim Feldman
-----Original Message-----
From: "efyf_1999" <effgroups@...>
Sender: vantage@yahoogroups.com
Date: Mon, 05 Jul 2010 22:05:04
To: <vantage@yahoogroups.com>
Reply-To: vantage@yahoogroups.com
Subject: [Vantage] Re: Activate a Shape control
Hi Sean
This is the code i did but it doesnt work maybe im missing something
'//**************************************************
'// Custom VB.NET code for POEntryForm
'// Created: 2007-07-18 5:32:26 PM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO
Module Script
'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **
Private WithEvents edvPODetail As EpiDataView
'// End Wizard Added Module Level Variables **
'// Add Custom Module Level Variables Here **
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
'// Begin Wizard Added Variable Initialization
edvPODetail = CType(oTrans.EpiDataViews("PODetail"), EpiDataView)
AddHandler edvPODetail.EpiViewNotification, AddressOf edvPODetail_EpiViewNotification
AddHandler PODetail_Column.ColumnChanged, AddressOf PODetail_AfterFieldChange
'// End Wizard Added Variable Initialization
'// Begin Wizard Added Custom Method Calls
'// End Wizard Added Custom Method Calls
End Sub
Sub DestroyCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal
RemoveHandler edvPODetail.EpiViewNotification, AddressOf edvPODetail_EpiViewNotification
edvPODetail = Nothing
RemoveHandler PODetail_Column.ColumnChanged, AddressOf PODetail_AfterFieldChange
'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal
'// End Custom Code Disposal
End Sub
Sub SetVisibility()
Dim [edvVarName] As EpiDataView = CType(oTrans.EpiDataViews("ListView"),EpiDataView)
Dim MyEpiShape as EpiShape
MyEpiShape = CType(csm.GetNativeControlReference("36c307ad-b9b0-4ed2-87bf-c9160c64e808"),EpiShape)
try
MyEpiShape.Enabled = [edvVarName].dataView([edvVarName].Row)("CheckBox06")
Catch ex as Exception
MyEpiShape.Enabled = false
End try
End Sub
Private Sub edvPODetail_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
'** Argument Properties and Uses **
'view.dataView(args.Row)("[FieldName]")
'args.Row, args.Column, args.Sender, args.NotifyType
'NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
If (args.NotifyType = EpiTransaction.NotifyType.Initialize) Then
If (args.Row > -1) Then
SetVisibility()
End If
End If
End Sub
Private Sub PODetail_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)
'** Argument Properties and Uses **
'args.Row("[FieldName]")
'args.Column, args.ProposedValue, args.Row
'Add Event Handler Code
Select Case args.Column.ColumnName
Case "CheckBox01"
SetVisibility()
Case Else
End Select
End Sub
End Module
I didn't change the checkbox06 to checkbox01.
Sorry
Ephraim Feldman
-----Original Message-----
From: "efyf_1999" <effgroups@...>
Sender: vantage@yahoogroups.com
Date: Mon, 05 Jul 2010 22:05:04
To: <vantage@yahoogroups.com>
Reply-To: vantage@yahoogroups.com
Subject: [Vantage] Re: Activate a Shape control
Hi Sean
This is the code i did but it doesnt work maybe im missing something
'//**************************************************
'// Custom VB.NET code for POEntryForm
'// Created: 2007-07-18 5:32:26 PM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO
Module Script
'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **
Private WithEvents edvPODetail As EpiDataView
'// End Wizard Added Module Level Variables **
'// Add Custom Module Level Variables Here **
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
'// Begin Wizard Added Variable Initialization
edvPODetail = CType(oTrans.EpiDataViews("PODetail"), EpiDataView)
AddHandler edvPODetail.EpiViewNotification, AddressOf edvPODetail_EpiViewNotification
AddHandler PODetail_Column.ColumnChanged, AddressOf PODetail_AfterFieldChange
'// End Wizard Added Variable Initialization
'// Begin Wizard Added Custom Method Calls
'// End Wizard Added Custom Method Calls
End Sub
Sub DestroyCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal
RemoveHandler edvPODetail.EpiViewNotification, AddressOf edvPODetail_EpiViewNotification
edvPODetail = Nothing
RemoveHandler PODetail_Column.ColumnChanged, AddressOf PODetail_AfterFieldChange
'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal
'// End Custom Code Disposal
End Sub
Sub SetVisibility()
Dim [edvVarName] As EpiDataView = CType(oTrans.EpiDataViews("ListView"),EpiDataView)
Dim MyEpiShape as EpiShape
MyEpiShape = CType(csm.GetNativeControlReference("36c307ad-b9b0-4ed2-87bf-c9160c64e808"),EpiShape)
try
MyEpiShape.Enabled = [edvVarName].dataView([edvVarName].Row)("CheckBox06")
Catch ex as Exception
MyEpiShape.Enabled = false
End try
End Sub
Private Sub edvPODetail_EpiViewNotification(ByVal view As EpiDataView, ByVal args As EpiNotifyArgs)
'** Argument Properties and Uses **
'view.dataView(args.Row)("[FieldName]")
'args.Row, args.Column, args.Sender, args.NotifyType
'NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
If (args.NotifyType = EpiTransaction.NotifyType.Initialize) Then
If (args.Row > -1) Then
SetVisibility()
End If
End If
End Sub
Private Sub PODetail_AfterFieldChange(ByVal sender As Object, ByVal args As DataColumnChangeEventArgs)
'** Argument Properties and Uses **
'args.Row("[FieldName]")
'args.Column, args.ProposedValue, args.Row
'Add Event Handler Code
Select Case args.Column.ColumnName
Case "CheckBox01"
SetVisibility()
Case Else
End Select
End Sub
End Module
--- In vantage@yahoogroups.com, "Sean McDaniel" <smcdaniel@...> wrote:
>
> In the wizard tab you will need to set up an EpiViewNotification for the
> view that contains the information to turn the shape on/off (this will
> be used to set the shape visibility when the record is initially
> displayed), and an onFieldChange event for when the field changes (this
> will be used to change the shape visibility when someone makes a change
> to the form).
>
> Create a procedure like this:
>
> Sub SetVisibility()
>
> Dim [edvVarName] As EpiDataView = CType(oTrans.EpiDataViews("ListView"),
> EpiDataView)
>
> Dim MyEpiShape as EpiShape
>
> MyEpiShape = CType(csm.GetNativeControlReference("<Your GUID Here>
> "),EpiShape)
>
> try
>
> MyEpiShape.Visible =
> [edvVarName].dataView([edvVarName].Row)("CheckBox06")
>
> Catch ex as Exception
>
> MyEpiShape.Visible = false
>
> End catch
>
> End Sub
>
>
>
> In the EpiViewNotification, change the "AddNew" to "initialize" and have
> it call the above procedure.
>
> In the OnFieldChange do the same thing.
>
>
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
> Of efyf_1999
> Sent: Friday, July 02, 2010 3:50 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Activate a Shape control
>
>
>
>
>
> Thanks for you reply
>
> I was able to set the form load but when it comes to setting it enabled
> and disable by a checkbox i couldnt do it
> Maybe you can explain a bit better since im a newbie.
>
> Thanks
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "bw2868bond" <bwalker@> wrote:
> >
> > In your Form Load event, define the text for the 2 states of the shape
> control, define the color of the control when enabled and set the
> initial status:
> >
> > shpMailInvoice.EnabledCaption = "Do Not Mail Invoice"
> > shpMailInvoice.DisabledCaption = "Invoice is Mailed"
> > shpMailInvoice.Status = StatusTypes.Warning
> > shpMailInvoice.Enabled = False
> >
> > find the event you want to use to change the status of the control and
> make it enabled or disabled:
> >
> > If (args.NotifyType = EpiTransaction.NotifyType.Initialize) Then
> > If (args.Row > -1) Then
> > shpMailInvoice.Enabled = view.dataView(args.Row)("CheckBox04")
> >
> > bw
> >
> > --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> "Mark Taylor" <mark.taylor@> wrote:
> > >
> > > I have the same problem.
> > >
> > > I was thinking I would need to use the event wizard, but I just
> don't
> > > know the code needed to enter in here to make it work.
> > >
> > > I just need one of our IT geeks to look at it when they have the
> time.
> > >
> > >
> > >
> > > Mark Taylor
> > > Senior Document Controller
> > >
> > > Hansatech EMS provides value manufacturing through engineering and
> > > quality
> > >
> > >________________________________
> > >
> > >
> > > Hansatech EMS Limited
> > > Benson Road
> > > Nuffield Industrial Estate
> > > Poole
> > > Dorset BH17 0RY
> > > United Kingdom
> > >
> > > Tel:
> > > Fax:
> > > DDI:
> > >
> > > +44 (0)1202 338200
> > > +44 (0)1202 338202
> > > +44 (0)1202 338228
> > >
> > > Mark.Taylor@
> > > www.HansatechEMS.com
> > >
> > >________________________________
> > >
> > > From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
> Behalf
> > > Of efyf_1999
> > > Sent: 01 July 2010 21:27
> > > To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
> > > Subject: [Vantage] Activate a Shape control
> > >
> > >
> > >
> > >
> > >
> > > I have a checkbox on the screen and i want a shape control should be
> > > active or not based on this checkbox how do i do it
> > >
> > > thanks
> > >
> > >
> > >
> > >
> > >__________________________________________________________
> > > This email has been scanned by the MessageLabs Email
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
[Non-text portions of this message have been removed]