on 2007 Jul 10 6:27 AM
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.
Hi,
Appart from what Olivier proposes you (that is right).
Have you tried to set the form.PaneLevel to the level corresponding to your first folder after you open your form?
After the form is opened do you still having problems to see the right folder content? If you have problems you should capture the click event on each folder and set the corresponding form.PaneLevel for each selected folder.
Hope it helps
Trinidad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I' ve handled everything in the screen painter itself. I gave the pane nos. as 1,2...5 to all my 5 folders. I gave these nos. in "frompane" and "Topane" properties for the all the fields relavant to that folders. For all the folders the "Specific" property alias has set as "FolderDS" automatically and I left as it is. I' ve hanled everything in screen painter and did't write any set of codes for folders. If I see the preview in screen painter itself, it seems display correctly and all the fields are displaying in the relavant folder only. But when I run the application, and see only the folders alone displaying not the fields. This is my problem. So please give the solution, if I need to add a code for folders that what & where I need to add it.
Thanks for your reply.
Thanks & Regards,
Venkatesan G.
Hi Venkatesan,
I remember having had a similar problem a while ago ("folders" showing properly in the ScreenPainter, but not in the application).
If I recall correctly, it's a matter of binding the tabs properly to a DataSource.
As the SDK help mentions:
To hold data within a Folder item, the item must be bound to
a data source (UserDataSource or DBDataSource) using Folder.DataBind.
You will also have to set the Folder#ValOn and Folder#ValOff (though I'm not sure whether the latter is absolutely necessary) properties properly. The values of the "ValOn" property should be different for each folder. Setting the value of the DataSource the "folder" is bound to to one of these values should select the proper "folder".
Yours,
Olivier
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Oliver,
Thanks for your immediate reply.
Thru' screen painter, for the folder item, I' ve set the specific properties
"Alias" as "FolderDS" and "DataBound" as "True" which has come automatically.
I' ve not entered any table name for the folder item.
Let me know please, in detail whether any code to be included and where I need to add. I did'nt found any help on this.
Thanks & Regards,
Venkatesan G.
User | Count |
---|---|
112 | |
8 | |
8 | |
6 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.