Skip to Content

How to make a widget section width dynamic in HCP Portal

May 18, 2017 at 09:18 AM


avatar image
Former Member

How can we change the width of a widget by clicking toggle button. Like below.

How to achieve this functionality? In HCP Portal service we can set the width of widget as 1/2, 1/3, 1/4, 1/6, 3/4, 2/4 of entire area. We cannot set the width as "auto".

pic-2.png (32.5 kB)
pic-1.png (38.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ido Shemesh
Jul 19, 2017 at 05:13 PM


The toggle functionility can be achived with SAPUi5 controles (or HTML) embedded in the widget/application. For instance:

To allow a portal admin to modify the width of a widget in the site designer, you need to make use of the WidgetSettings API (this will expose the setting option for the widget and will allow you to register in your app to widget setting change events;

The value (of the width) that is enetered by the user (admin) can be then set to the view/app controls in the widget application.

Regards, Ido

10 |10000 characters needed characters left characters exceeded