25 views
in GUI Development by

Hello there,

We have recently completed update of existing projects from version 9.20 to 12.01 generated code. Everything is working pretty well after the update but we are seeing something strange with our common menu components that use the vertical list. There seems to be some additional height coming for each item in the menu, which accumulates and leading to some clipping for the last item. We suspect it is something about the new capability to handle variable height elements in the vertical list. So far we are not trying to use this new ability and left our chora code unchanged.

Can you please point us at a hint of the cause and some method to restore the previous appearance?

To illustrate you can see the prototype viewer for both versions side by side with 9.20 on left side and 12.01 on right side.

One point to note is that our menu controls have set ItemHeight to not exactly the actual height of ItemClass.

Example, the vertical list below has ItemHeight = 50 and the button type has height 48.

The vertical list below has ItemHeight = 56 and the button type has height 60.

1 Answer

0 votes
by
 
Best answer

Hello,

I suppose, you have already detected the problem:

One point to note is that our menu controls have set ItemHeight to not exactly the actual height of ItemClass.

Please verify the implementation of the OnLoadItem method. This method should explicitly adjust the size of the item to correspond to the value specified in the Vertical List. For this purpose the method should contain following row (valid for all EW versions):

itemView.Bounds.size = point( VerticalList.Bounds.w, VerticalList.ItemHeight );

or since version 12 more elegant and more flexible for lists with variable item height:

itemView.Bounds.size = VerticalList.ViewSize;

See also the section Implement the OnLoadItem slot method to load the items.

I hope it solves the issue.

Best regards

Paul Banach

by
Hi Paul,

Yes, I got it to restore the original appearance by simply adjust the loaded view heights during OnLoadItem slot.

Thanks!

Niall.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...