Widget issues between SAP 8.8 and 8.81
We are currently developping a widget based on your Coresuite Framework. When designed it using SAP B1 8.8 and it had worked well since.
But we are now deploying it on SAP B1 8.81 since some of our customers use this new version. When we try to drag the widget onto a cockpit, the widget window "blinks" at the right edge of the cockpit window before disapearing. We then have to close SAP B1 and reopen it to see the widget window at the right edge of the cockpit. We also have to resize the window (since it is really small) and we have some trouble dragging it left or down on the cockpit.
Prior to 8.81, the widget was correctly dragged, painted and resized on the cockpit and was easy to move. But now it shows strange behaviors.
We tested it with Coresuite 3.10 . I don't know if this could work on a prior version and SAP 8.81. The widget works well in SAP 8.8 with coresuite 2.90
We are using Visual Studio 2008 as the development tool with C# as the language. We are using the "Framework development version" you provided us some months ago when we began using your framework. We may need to update it (If I check the package, there is a folder named "SAP88_SP00_PL16" in it with the "Loader", "SwissAddOnFramework" and sap DLLs. I have tried to reference these SAP DLLs as well as the ones in the Coresuite install folder but the problem is still there).
Please notify me if you need any more information.
Paolo ManfrinHi Sébastien,
are you initializing the property high and width of the widget?
In 8.81 if those property are not inititalized in the widget prototype then you face the issue described.
Try setting width = 1 and height = 5
Sébastien NadeauOK, I will check that and let you know if this works !
Sorry for not responding on this topic : I was away from the project for the past weeks.
We now want to solve this issue and I have tried to initialize the values you suggested with no success.
In fact, there seems to be several ways to change the width and height.
First, I set the properties right before registering the widget, using a SAPbouiCOM.WidgetRegParams object. I use the Application.Cockpits.RegisterWidget method to register it
After that, I have overriden the SwissAddonFramework.UI.Components.Windows.SAPDotNetForm.GetInitialDimensions method to center the widget screen. This code was already in the widget prior to our 8.81 testing after following recommandations about how to create a widget.
Finally, I tried to override the SwissAddonFramework.UI.Components.Windows.SAPDotNetForm.MinimumSize method to restrict the minimum size, with no success
Maybe all those ways to resize and place the widget are interfering with each other. When you are talking about width and height ot the widget, where in the code should I specify/override that ?
Thanks a lot and have a nice day !
Paolo ManfrinHi Sébastien,
the only place where you should change height and width is in the WidgetRegParams like the following:
SAPbouiCOM.WidgetRegParams wrp = (SAPbouiCOM.WidgetRegParams)SwissAddonFramework.B1Connector.GetB1Connector().Application.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_WidgetRegParams);
// This will be the FormTypeEx to catch the right events
wrp.WidgetType = Util.Global.FORM_TYPE_EX;
// This will be displayed in the menu
wrp.WidgetName = Util.Global.WIDGET_NAME;
wrp.Height = 5;
wrp.Width = 1;
// Always use this category to keep all coresuite widgets in one folder
wrp.CategoryUID = "coresuite widgets";
// Register the Widget