cancel
Showing results for 
Search instead for 
Did you mean: 

itemListBox --> I can't set the size

Former Member
0 Kudos

Hi,

I have a problem with the itemListBox object in WD ABAP. I want to use three list boxes to display some data,

but it is essential, that the size of the boxes stay, as they are set up.

When I create the itemListBox object and set the attribute visibleItems to "10", the system doesn't care. If the node,

to which the itemListBox is bound to, contains just one element, the itemListBox has just the size of one element. If

the node contains more, the item list box is bigger. I haven't found any way to set the size of the list box, that it has

always one fixed size, no matter how many entries the bound node has...

Any ideas?

This is just frusttrating!

Thank you very much!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

>

> Hi,

>

> I have a problem with the itemListBox object in WD ABAP. I want to use three list boxes to display some data,

> but it is essential, that the size of the boxes stay, as they are set up.

>

> When I create the itemListBox object and set the attribute visibleItems to "10", the system doesn't care. If the node,

> to which the itemListBox is bound to, contains just one element, the itemListBox has just the size of one element. If

> the node contains more, the item list box is bigger. I haven't found any way to set the size of the list box, that it has

> always one fixed size, no matter how many entries the bound node has...

>

> Any ideas?

>

> This is just frusttrating!

>

> Thank you very much!

Hi ,

I have tested in the wdr_test_ui_elements, it is working correctly. So i expect that it should work for you. Are you sure that the element binded to this property is filled by the size of the node ?.

If this is not a case and you didnt do any strange things then i would advice you to contact SAP for your support.

Former Member
0 Kudos

Hi Baskaran,

thanks for the immediate answer. What exactly do you mean?

I have set the following attributes of itemListBox element:

dataSource ---> Bound to the node of list values
test ----> Bound to the description text attribute of the node of list values
visibleItems ----> Set fixed to 20
width ---> 150px (Without setting this, the box is also nearly the size of zero in width...

In the container around, I'm using matrix layout and set the width and height to 100%.
I also checked the boxes for "stretch vertically & horizontally".

Nothing helps... I don't really know, how to get this solved. In my case, using tables would be a bad compromise.

I wouldn't look like, as it should...

Thanks for your help!

gill367
Active Contributor
0 Kudos

Hello Michael,

if the number of element sin the node are less than the number you specified in the visiblerows property.

then it will be shown with the shorter height required for these number of elements.

i guess this behaviour you cannot change.

in case of number of elements are more. it wont incearse in the size only the first 10 or 20 whtever you have given there

will be shown.

so the problem is in the case of lesser number of lements.

an i am afraid that you cannot control.

but why you want to control it like that.

if the number of elements are less let it be shorter itemlist.

thanks

sarbjeet singh

Former Member
0 Kudos

Hi ,

I would advice you to try the following.

1.Create a Context attribute list_items of type i .

2.Bind this attribute to visible items property of the listbox in view designer.

From doInit method or some other method set the value of the list_items to 20.

Test it. This is the wdr_test_ui_elements works and it is there working correctly.

Answers (0)