Hi
I' ve developed a form with multiple folders using Screen painter. The lables, text boxes created each folders and set the "From Pane", "To Pane" as to relavant folders. In those folders two of them are matrix folders. If we run preview on screen painter the fields are displaying properly in the relavant folders.
Then I' ve written the code for Combo box..etc., When I run the code, the particular form is displaying with folder without any fields in the folders. If I open the form by using screen painter, and preview once then close the screen painter (without stop the program) then again i open the form from the menu, all the fields relavant to that folder is displaying properly.
Let me know, if anybody knows, how to overcome this problem and I would to like to say "Thanks in advance"
The code I've written as follows and I am using SBO 2005 B and dot net 2005.
Public Sub display()
SetApplication()
Dim oColumns As SAPbouiCOM.Columns
Dim oItem As SAPbouiCOM.Item
Try
LoadFromXML("MachineMaster.srf")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Try
Oform = SBO_Application.Forms.Item("frmachine")
' Add Edit Items
oItem = Oform.Items.Item("txtmcode")
txtmcode = oItem.Specific
oItem = Oform.Items.Item("txtmname")
txtmname = oItem.Specific
oItem = Oform.Items.Item("txtgname")
txtgname = oItem.Specific
AddMgrpcombo(txtgname)
oItem = Oform.Items.Item("txtwcr")
txtwcr = oItem.Specific
AddWCntcombo(txtwcr)
oItem = Oform.Items.Item("txtpdate")
txtpdate = oItem.Specific
oItem = Oform.Items.Item("txtidate")
txtidate = oItem.Specific
oItem = Oform.Items.Item("txtmdn")
txtmdn = oItem.Specific
oItem = Oform.Items.Item("txtnmdt")
txtnmdt = oItem.Specific
oItem = Oform.Items.Item("txtmhr")
txtmhr = oItem.Specific
oItem = Oform.Items.Item("txtmst")
txtmst = oItem.Specific
oItem = Oform.Items.Item("txttsp")
txttsp = oItem.Specific
oItem = Oform.Items.Item("txtremark")
txtremark = oItem.Specific
oItem = Oform.Items.Item("txtaccode")
txtaccode = oItem.Specific
AddAccodecombo(txtaccode)
oItem = Oform.Items.Item("txtacname")
txtacname = oItem.Specific
'*****************************************************
' Add a matrix for shift
oItem = Oform.Items.Item("mat1")
Omatrix = oItem.Specific
oColumns = Omatrix.Columns
' Shift Code
colscode = oColumns.Item("colscode")
colsname = oColumns.Item("colsname")
Omatrix.AddRow()
AddsftToCombo(colscode)
'*****************************************************
' Add a matrix for item
oItem = Oform.Items.Item("mat")
Omatrix = oItem.Specific
oColumns = Omatrix.Columns
' item Code
colicode = oColumns.Item("colicode")
coliname = oColumns.Item("coliname")
colqty = oColumns.Item("colqty")
coluom = oColumns.Item("coluom")
Omatrix.AddRow()
AddItemsToCombo(colicode)
SetToolBarEnabled()
Oform.DataBrowser.BrowseBy = "txtmcode"
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Thanks and Regards,
Venkatesan G.