Placing a custom label relative to existing control  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Placing a custom label relative to existing control

Postby indikad » Wed Feb 15, 2017 4:19 pm

I want to place a custom label on the sales order form just under the "Credit Reason" label.
My label displays but not in the right place. I am using the form load event. What is the best event and the best way to place the label please ?

Code: Select all
Dim TestLabel  As Infragistics.Win.Misc.UltraLabel = New Infragistics.Win.Misc.UltraLabel
         With TestLabel            
            .Location = New System.Drawing.Point(salesOrderForm.lblCreditReason.Location.X + salesOrderForm.lblClosed.Width , salesOrderForm.lblCreditReason.Location.Y + 20  )
            .Appearance = salesOrderForm.lblClosed.Appearance
            .Dock = System.Windows.Forms.DockStyle.None
            .Name = "TestLabel_10"
            .Size = salesOrderForm.lblClosed.Size
            .Text = "Test Label 10"
                     
            Dim parentPanel  As TableLayoutPanel
            Dim ctrls As Control()
            ctrls = salesOrderForm.Controls.Find("TableLayoutPanel1", True ) ' TableLayoutPanel1
            Dim ctl As Control
            For Each ctl  In ctrls
               If ctl.Name = "TableLayoutPanel1" Then
                  Exit For
               End If
            Next
            parentPanel =  DirectCast (ctl,TableLayoutPanel)
            parentPanel.Controls.Add(TestLabel)
            .Anchor = AnchorStyles.Bottom             
         End With
         
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Placing a custom label relative to existing control  Topic is solved

Postby Scott.Pearce » Wed Feb 15, 2017 4:40 pm

When you programmatically add a control to a TableLayoutPanel, you also need to supply the column and row number (0 based) of the cell into which you want the control to be placed. In your case try changing the line:

Code: Select all
parentPanel.Controls.Add(TestLabel)


to:

Code: Select all
parentPanel.Controls.Add(TestLabel, 2, 6)


Further, I recommend you create a test project with just a form, a TableLayoutPanel control, and a label and have a play around to get a feel for how TableLayoutPanels and it's child controls behave - you will see that if you drag a control onto a TableLayoutPanel the control gets a Row and Column property created for it at design time.
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 743
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 221

Re: Placing a custom label relative to existing control

Postby indikad » Thu Feb 16, 2017 9:25 am

Thanks Scott.
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Placing a custom label relative to existing control

Postby indikad » Thu Feb 16, 2017 11:41 am

Hi Scott,

would you also be able to help me with some sample code that will allow me to pop up a modal window off the custom lable pls ?
similar to what the "Printed" lable does.
Thanks.
indikad
Frequent Contributor
Frequent Contributor
 
Posts: 182
Joined: Thu Jun 18, 2009 1:14 pm
Topics Solved: 2

Re: Placing a custom label relative to existing control

Postby Mike.Sheen » Tue Feb 21, 2017 5:41 pm

What you need to do to recreate the print log dialog is create a dialog, and invoke that on the click of a label.

Adding the click handler is simple enough - you'll want to do this in the Setup method of the FormPlugin class, after you have added your control to the form:
Code: Select all
AddHandler salesOrderForm.lblPrinted.Click, AddressOf lblPrinted_Click


The handler itself is pretty self-explanatory:
Code: Select all
Private Sub lblPrinted_Click(sender As System.Object, e As System.EventArgs)
    Dim printLogDialog As PrintLog
    printLogDialog = JiwaApplication.Manager.Instance.DialogFactory.CreateDialog(Of PrintLog)(New Object() {salesOrderForm.SalesOrder}, salesOrderForm, "Sales Order Entry")
    printLogDialog.ShowDialog(Me)
End Sub


The dialog is a bit more involved - but this should give you enough to be able to get up and running:
Code: Select all
Public Class PrintLog
   Implements JiwaApplication.IJiwaDialog

   Private _Context As String
   Private _StartParameters() As Object
   Private _SalesOrder As JiwaSales.SalesOrder.SalesOrder

   Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
      Me.DialogResult = System.Windows.Forms.DialogResult.OK
      Me.Close()
   End Sub

   Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Close_Button.Click
      Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
      Me.Close()
   End Sub

   Public Overridable Property Context As String Implements JiwaFinancials.Jiwa.JiwaApplication.IJiwaDialog.Context
      Get
         Return _Context
      End Get
      Set(value As String)
         _Context = value
      End Set
   End Property

   Public Overridable Property StartParameters() As Object Implements JiwaFinancials.Jiwa.JiwaApplication.IJiwaDialog.StartParameters
      Get
         Return _StartParameters
      End Get
      Set(value As Object)
         _StartParameters = value
      End Set
   End Property

   Public Overridable ReadOnly Property Form As System.Windows.Forms.Form Implements JiwaFinancials.Jiwa.JiwaApplication.IJiwaDialog.Form
      Get
         Return Me
      End Get
   End Property


   Public Overloads Function ShowDialog(owner As System.Windows.Forms.IWin32Window) As System.Windows.Forms.DialogResult Implements JiwaApplication.IJiwaDialog.ShowDialog
      Return MyBase.ShowDialog(owner)
   End Function

   Public Sub Start(Context As String, StartParameters() As Object, ByVal OwnerForm As System.Windows.Forms.form) Implements JiwaApplication.IJiwaDialog.Start
      _Context = Context
      _StartParameters = StartParameters

      If Not StartParameters Is Nothing Then
         _SalesOrder = StartParameters(0)
      End If

      SetupForm()
      DisplayPrintLog()
   End Sub

   Private Sub SetupForm()
      SetupWindow()
      SetupControls()
   End Sub

   Private Sub SetupWindow()
      JiwaApplication.Manager.RestoreDialog(Me)
      KeyPreview = True

      Me.Text = Me.Text & " " & _SalesOrder.InvoiceNo & " " & _SalesOrder.Debtor.AccountNo & " - " & _SalesOrder.Debtor.Name
   End Sub

   Private Sub SetupControls()
      Dim TextWrappedCellType = New JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid.JiwaTextCellType
      TextWrappedCellType.WordWrap = True

      grdPrintLog.AddColumn("PrintDate", New JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid.JiwaTextCellType, "Date", 20, False , , True, True)
      grdPrintLog.AddColumn("SnapShot", New JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid.JiwaTextCellType, "Snap", 10, False , , True, True)
      grdPrintLog.AddColumn("Description", TextWrappedCellType, "Description", 50, False , True, True, True, 255)
      grdPrintLog.AddColumn("Staff", New JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid.JiwaTextCellType, "Staff", 16, False , , True, True)
      grdPrintLog.AddColumn("ReportType", New JiwaFinancials.Jiwa.JiwaApplication.JiwaManageGrid.JiwaTextCellType, "ReportType", 15, False , , True, True)
      grdPrintLog.SetupComplete()

   End Sub

   Private Sub DisplayPrintLog()

      grdPrintLog.ActiveSheet.RowCount = 0

      For Each printLog As JiwaSales.SalesOrder.PrintLog In _SalesOrder.PrintLogCollection
         grdPrintLog.ActiveSheet.RowCount += 1
         grdPrintLog.ActiveSheet.Rows(grdPrintLog.ActiveSheet.RowCount - 1).Height = 50

         grdPrintLog.GridText("PrintDate", grdPrintLog.ActiveSheet.RowCount - 1) = Format(printLog.PrintDateTime, "dd/MM/yyyy hh:mm:ss")

         Dim HistoryNo As Integer = 0
         For MyLoop As Integer = 1 To _SalesOrder.SalesOrderHistorys.Count
            If printLog.HistoryID.Trim = _SalesOrder.SalesOrderHistorys(MyLoop).RecID Then
               HistoryNo = MyLoop
               Exit For
            End If
         Next

         grdPrintLog.GridText("SnapShot", grdPrintLog.ActiveSheet.RowCount - 1) = _SalesOrder.SystemSettings.DocketNumHeader & Format$(HistoryNo, "00")

         grdPrintLog.GridText("Description", grdPrintLog.ActiveSheet.RowCount - 1) = printLog.Description

         Select Case printLog.ReportType
            Case JiwaSales.SalesOrder.SalesOrder.SalesOrderReportTypes.e_SalesOrderReportTypeInvoice
               grdPrintLog.GridText("ReportType", grdPrintLog.ActiveSheet.RowCount - 1) = "Invoice"
            Case JiwaSales.SalesOrder.SalesOrder.SalesOrderReportTypes.e_SalesOrderReportTypeDeliveryDocket
               grdPrintLog.GridText("ReportType", grdPrintLog.ActiveSheet.RowCount - 1) = "Del. Doc."
            Case JiwaSales.SalesOrder.SalesOrder.SalesOrderReportTypes.e_SalesOrderReportTypePackingSlip
               grdPrintLog.GridText("ReportType", grdPrintLog.ActiveSheet.RowCount - 1) = "Pack Slip"
            Case JiwaSales.SalesOrder.SalesOrder.SalesOrderReportTypes.e_SalesOrderReportTypePickingSheet
               grdPrintLog.GridText("ReportType", grdPrintLog.ActiveSheet.RowCount - 1) = "Pick Sheet"
            Case JiwaSales.SalesOrder.SalesOrder.SalesOrderReportTypes.e_SalesOrderReportTypeOther
               grdPrintLog.GridText("ReportType", grdPrintLog.ActiveSheet.RowCount - 1) = "Other"
         End Select

         grdPrintLog.GridText("Staff", grdPrintLog.ActiveSheet.RowCount - 1) = printLog.Staff.UserName '& "(" & printLog.Staff.Title & " " & printLog.Staff.FirstName & " " & printLog.Staff.Surname & ")"
      Next
   End Sub

   Private Sub MainForm_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
      If e.Cancel = False Then
         JiwaApplication.Manager.SaveDialog(Me)
      End If
   End Sub
End Class


You can either use this designer code, or copy paste from a visual studio designed form - just make sure the class name matches the class above.
Code: Select all
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class PrintLog
   Inherits System.Windows.Forms.Form

   'Form overrides dispose to clean up the component list.
   <System.Diagnostics.DebuggerNonUserCode()> _
   Protected Overrides Sub Dispose(ByVal disposing As Boolean)
      Try
         If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
         End If
      Finally
         MyBase.Dispose(disposing)
      End Try
   End Sub

   'Required by the Windows Form Designer
   Private components As System.ComponentModel.IContainer

   'NOTE: The following procedure is required by the Windows Form Designer
   'It can be modified using the Windows Form Designer. 
   'Do not modify it using the code editor.
   <System.Diagnostics.DebuggerStepThrough()> _
   Private Sub InitializeComponent()
      Me.components = New System.ComponentModel.Container()
      Dim grdPrintLog_InputMapWhenAncestorOfFocusedNormal As FarPoint.Win.Spread.InputMap
      Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(PrintLog))
      Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
      Me.Close_Button = New System.Windows.Forms.Button()
      Me.grdPrintLog = New JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid()
      Me.InboxControlStyler1 = New Infragistics.Win.AppStyling.Runtime.InboxControlStyler(Me.components)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal = New FarPoint.Win.Spread.InputMap()
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent = New FarPoint.Win.Spread.InputMap()
      Me.TableLayoutPanel1.SuspendLayout()
      CType(Me.grdPrintLog, System.ComponentModel.ISupportInitialize).BeginInit()
      CType(Me.InboxControlStyler1, System.ComponentModel.ISupportInitialize).BeginInit()
      Me.SuspendLayout()
      '
      'TableLayoutPanel1
      '
      Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
      Me.TableLayoutPanel1.ColumnCount = 2
      Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
      Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
      Me.TableLayoutPanel1.Controls.Add(Me.Close_Button, 1, 0)
      Me.TableLayoutPanel1.Location = New System.Drawing.Point(400, 274)
      Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
      Me.TableLayoutPanel1.RowCount = 1
      Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
      Me.TableLayoutPanel1.Size = New System.Drawing.Size(146, 29)
      Me.InboxControlStyler1.SetStyleSettings(Me.TableLayoutPanel1, New Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings(Infragistics.Win.DefaultableBoolean.[Default]))
      Me.TableLayoutPanel1.TabIndex = 0
      '
      'Close_Button
      '
      Me.Close_Button.Anchor = System.Windows.Forms.AnchorStyles.None
      Me.Close_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
      Me.Close_Button.Location = New System.Drawing.Point(76, 3)
      Me.Close_Button.Name = "Close_Button"
      Me.Close_Button.Size = New System.Drawing.Size(67, 23)
      Me.InboxControlStyler1.SetStyleSettings(Me.Close_Button, New Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings(Infragistics.Win.DefaultableBoolean.[Default]))
      Me.Close_Button.TabIndex = 1
      Me.Close_Button.Text = "&Close"
      '
      'grdPrintLog
      '
      Me.grdPrintLog.AccessibleDescription = ""
      Me.grdPrintLog.AllowColumnMove = True
      Me.grdPrintLog.AllowColumnMoveMultiple = True
      Me.grdPrintLog.AllowSorting = True
      Me.grdPrintLog.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
         Or System.Windows.Forms.AnchorStyles.Left) _
         Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
      Me.grdPrintLog.ButtonDrawMode = FarPoint.Win.Spread.ButtonDrawModes.CurrentRow
      Me.grdPrintLog.ClipboardOptions = FarPoint.Win.Spread.ClipboardOptions.ColumnHeaders
      Me.grdPrintLog.EditModePermanent = True
      Me.grdPrintLog.EditModeReplace = True
      Me.grdPrintLog.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded
      Me.grdPrintLog.InputMapWhenAncestorOfFocusedNormal = Nothing
      Me.grdPrintLog.Location = New System.Drawing.Point(12, 12)
      Me.grdPrintLog.Name = "grdPrintLog"
      Me.grdPrintLog.RetainSelectionBlock = False
      Me.grdPrintLog.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Both
      Me.grdPrintLog.selectedCellRanges = Nothing
      Me.grdPrintLog.ShowCellErrors = True
      Me.grdPrintLog.Size = New System.Drawing.Size(531, 246)
      Me.grdPrintLog.SourceCollection = Nothing
      Me.InboxControlStyler1.SetStyleSettings(Me.grdPrintLog, New Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings(Infragistics.Win.DefaultableBoolean.[Default]))
      Me.grdPrintLog.TabIndex = 1
      Me.grdPrintLog.TypeCurrencyDecimalPlaces = New Decimal(New Integer() {2, 0, 0, 0})
      Me.grdPrintLog.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Delete, System.Windows.Forms.Keys.None), "DeleteKey")
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Up, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToPreviousRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Down, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Left, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToPreviousColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Right, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Up, CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToPreviousRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Down, CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToNextRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Left, CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToPreviousColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Right, CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToNextColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Up, CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToPreviousRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Down, CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToNextRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Left, CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToPreviousColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Right, CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToNextColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Up, CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToPreviousRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Down, CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToNextRow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Left, CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToPreviousColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Right, CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToNextColumnVisual)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.PageUp, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToPreviousPageOfRows)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[Next], System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextPageOfRows)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.PageUp, CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToPreviousPageOfColumns)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[Next], CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToNextPageOfColumns)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.PageUp, CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToPreviousPageOfRows)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[Next], CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToNextPageOfRows)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.PageUp, CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToPreviousPageOfColumns)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[Next], CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToNextPageOfColumns)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Home, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToFirstColumn)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[End], System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToLastColumn)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Home, CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToFirstCell)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[End], CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToLastCell)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Home, CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToFirstColumn)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[End], CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToLastColumn)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Home, CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToFirstCell)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[End], CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ExtendToLastCell)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Space, CType((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.SelectColumn)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Space, CType(((System.Windows.Forms.Keys.Control Or System.Windows.Forms.Keys.Shift) _
               Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.SelectSheet)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Escape, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.CancelEditing)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.[Return], System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.StopEditing)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Tab, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.MoveToNextColumnWrap)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Tab, CType((System.Windows.Forms.Keys.Shift Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.MoveToPreviousColumnWrap)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.F2, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.ClearCell)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.F3, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.DateTimeNow)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.F4, System.Windows.Forms.Keys.None), FarPoint.Win.Spread.SpreadActions.ShowSubEditor)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Down, CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ComboShowList)
      grdPrintLog_InputMapWhenAncestorOfFocusedNormal.Parent.Put(New FarPoint.Win.Spread.Keystroke(System.Windows.Forms.Keys.Up, CType((System.Windows.Forms.Keys.Alt Or System.Windows.Forms.Keys.None), System.Windows.Forms.Keys)), FarPoint.Win.Spread.SpreadActions.ComboShowList)
      Me.grdPrintLog.SetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused, FarPoint.Win.Spread.OperationMode.Normal, grdPrintLog_InputMapWhenAncestorOfFocusedNormal)
      '
      'PrintLog
      '
      Me.AcceptButton = Me.Close_Button
      Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
      Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
      Me.CancelButton = Me.Close_Button
      Me.ClientSize = New System.Drawing.Size(558, 315)
      Me.Controls.Add(Me.grdPrintLog)
      Me.Controls.Add(Me.TableLayoutPanel1)
      Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
      Me.MaximizeBox = False
      Me.MinimizeBox = False
      Me.Name = "PrintLog"
      Me.ShowInTaskbar = False
      Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
      Me.InboxControlStyler1.SetStyleSettings(Me, New Infragistics.Win.AppStyling.Runtime.InboxControlStyleSettings(Infragistics.Win.DefaultableBoolean.[Default]))
      Me.Text = "Printed Reports For"
      Me.TableLayoutPanel1.ResumeLayout(False)
      CType(Me.grdPrintLog, System.ComponentModel.ISupportInitialize).EndInit()
      CType(Me.InboxControlStyler1, System.ComponentModel.ISupportInitialize).EndInit()
      Me.ResumeLayout(False)

   End Sub
   Public WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
   Public WithEvents Close_Button As System.Windows.Forms.Button
   Public WithEvents grdPrintLog As JiwaFinancials.Jiwa.JiwaApplication.Controls.JiwaGrid
   Public WithEvents InboxControlStyler1 As Infragistics.Win.AppStyling.Runtime.InboxControlStyler

End Class
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 19 guests