on 05-18-2009 2:53 PM
Hello all,
I am wondering if I have to manually handle clicks of folder object and set the form's PaneLevel property.
The Folder object has the Pane property. What is it for if not for setting the Form's PaneLevel according to the folder clicked?
I have created several folders, have bound them to the same user datasource, have grouped them using Folder.GroupWith(method), but still they do not work automatically.
Is this the correct behaviour?
Anton
Anton,
There is a sample that shows how to work with Folders that comes with the SAP Business One SDK as part of the samples. Please have a look at ...
..\Program Files\SAP\SAP Business One SDK\Samples\COM UI\VB.NET\11.SystemFormManipulation
Hope that helps,
Eddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Believe me, I lost a bet over this. Had to buy my colleague a drink because of it. I'm not 100% sure of this - i never asked any admins or something like that.
However, you can try one simple thing. Stop the ScreenPainter addon and see if it still works after that . There's no logical explanation for folder clicks working just on some forms and in some cases.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is just an illusion. What happens is this : you create the form in ScreenPainter and then you click Preview - > what happens here is that the ScreenPainter addon adds events for Folder click . When you exit the designer the events are not removed because the ScreenPainter addon is still on.
So, when you test your form in your addon, the events for click on Folders are still registered. That's why it sometimes work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is a Pane property. Just build a form in Screen Painter - you can set the Pane property. I don't know if this is valid for UI api, though .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anton,
When user clicks on a certain tab, you need to capture the event and set the Form.PaneLevel property accordingly. (I don't beleive there is a Pane property on Folder object.)
For each item on the form, you should specify FromPane and ToPane properties according to which panes you want this item to be visible on. If both FromPane and ToPane are set to 0 for a given item, it will be visible on all panes.
Regards
Aravind
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Aravind Gadagottu:
When user clicks on a certain tab, you need to capture the event and set the Form
Thanks for reassuring. That's what I am currentry doing.
I don't beleive there is a Pane property on Folder object.
But it is there in Screen Painter! I even thought of reading it form the .xml manually to make all the work with Folders automatical (depending only on the .srf file and a piece of generic code, applicable to all forms).
Edward Neveux: Thanks, that also confirms that I have to do it manually (or as I suppposed above).
Anton
Unless I am mistaking, what you are saying is what happens with Screen Painter.
The thing I noticed is that the Screen Painter adds a User DataSource for each folder ( all are named "FolderDS") and sets the pane levels. Maybe you can try this, to set one DS for each folder tab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the Pane Property of folder is used to link all the child Item the folder will contain. Like if I create three folder with Pane set to 1,2,3. When I add a new item after that I have choice which tab it should be placeed in. For button if I set FromPan=1 , ToPan=1, the button will be available only on folder 1. and if I set it to 2,2 it will be in folder 2. 0 is used to place the new item in main window. Hope it may help you little
Ubaid Mughal:
the Pane Property of folder is used to link all the child Item the folder will contain.
That's what I thought it was until I had found that in practice it does not work this way. As have been mentioned above, when using Folders one has to handle ItemPress events on each Folder and then manually change the form's PaneLevel property according to Folder that has been pressed.
With this manual work involved, the Pane property is just useless. If it had worked as you described, then this manual setting of Form.PaneLevel wouldn't have been necessary.
I just don't see how SBO makes use of this property. Maybe it just a stab and will be really used in the future?
Anton
Just to mud the water a bit more I can confirm that there are some circumstances when the folder change works without coding. I created srfs a number of times when this worked, by specifying the "pane" folder property, then all of a sudden it stopped working and I had to put in the code of handling the item pressed event.
I've spent now a bit of time, as this just happened again, trying the figure the right combination, but I am positive that I haven't changed anything since yesterday, yet the automatic method is not working.
So, I think this is a bug, really, but with a workaround.
Cheers
Adam
User | Count |
---|---|
110 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.