perry wrote:Can you provide a sample plugin to use JiwaBadge in Quoting please?
Color, font, width and position, for example, it will be in front of SalesOrderBadge but after ClosedJiwaBadge
Hi Perry,
The attached plugin adds a badge to the sales quotes form - the code which does the actual work is also pasted below. The colour is determined by the Appearance.BackColor and Appearance.ForeColor properties. The location, size and text (caption) are the same as a normal windows control.
- Code: Select all
Public Sub Setup(ByVal JiwaForm As JiwaApplication.IJiwaForm, ByVal Plugin As JiwaApplication.Plugin.Plugin) Implements JiwaApplication.IJiwaFormPlugin.Setup
Dim quoteForm As JiwaSalesUI.SalesQuote.SalesQuoteEntryForm = DirectCast(JiwaForm, JiwaSalesUI.SalesQuote.SalesQuoteEntryForm)
Dim SampleJiwaBadge As New JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaBadge
quoteForm.Panel1.Controls.Add(SampleJiwaBadge)
Dim BadgeAppearance As Infragistics.Win.Appearance = New Infragistics.Win.Appearance()
BadgeAppearance.BackColor = System.Drawing.Color.Red
BadgeAppearance.ForeColor = System.Drawing.Color.White
BadgeAppearance.TextHAlignAsString = "Center"
BadgeAppearance.TextVAlignAsString = "Middle"
SampleJiwaBadge.Appearance = BadgeAppearance
SampleJiwaBadge.ArcWidth = 20
SampleJiwaBadge.Dock = System.Windows.Forms.DockStyle.Left
SampleJiwaBadge.Font = New System.Drawing.Font("Arial", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
SampleJiwaBadge.Location = New System.Drawing.Point(quoteForm.ClosedJiwaBadge.left + quoteForm.ClosedJiwaBadge.Width + 10, 0)
SampleJiwaBadge.Name = "SampleJiwaBadge"
SampleJiwaBadge.Size = New System.Drawing.Size(62, 20)
SampleJiwaBadge.TabIndex = 26
SampleJiwaBadge.Text = "Sample"
SampleJiwaBadge.Visible = True
End Sub
Mike