on 2/6/06 5:56 PM, Mark Cooke at [EMAIL PROTECTED] wrote:

> Hi,
> 
> I'm writing a very simple account program (only for myself), not
> coming from an event or Multiple window coding environment (mainly
> terminal based programs), I was wondering of the best and cleanest
> way of passing data between two windows.

Here are some suggestions:

subclass Listbox as cl_lb_appendable

and give it a method:

RowAppend (rowData As String)
   Me.AddRow ""
   Me.Cell(Me.LastIndex, -1) = rowData

Change the EditFields in your transaction window to a control array...
  ef_transactionData().

Add a property to your transaction window, which will contain a reference to
the ListBox (super: cl_lb_appendable) in your main window...

    lb_ref As cl_lb_appendable

Add a method to your transaction window, to be called from your 'Save'
button's 'Action' event...

lbUpdate()

  Dim lbRowData As String

  lbRowData = ef_transactionData(0).Text

  Dim i As Integer = 1
  While ef_transactionData(i) <> Nil
    lbRowData = lbRowData + HT + ef_transactionData(i)
    i.Increment // global function. Returns i + 1
  Wend

  lbRef.RowAppend lbRowData

(HT is a global function that returns Chr(9).)

HTH

P.



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to