ResizeLayoutPanel inside DisclosurePanel using GWT

后端 未结 1 1270
情深已故
情深已故 2021-01-26 21:55

I\'m having problems using ResizeLayoutPanel inside DisclosurePanel.

I have a Datagrid into ResizeLayoutPanel, and ResizeLayaoutPanel inside DisclosurePanel. The proble

1条回答
  •  悲哀的现实
    2021-01-26 22:08

    ResizeLayoutPanel provides resize (implements ProvidesResize) but does not requires resize (does not implement RequiresResize).

    Since ResizeLayoutPanel in its plain state does not listen to resize, you have to deliberately resize it, or write code to resize it. Perhaps, set width and height to 100%.

    And then, why did you place the table inside a ResizeLayoutPanel ?

    ResizeLayoutPanel provides resize to widgets that RequiresResize. You need to extend the celltable to implement RequiresResize, so that the ResizeLayoutPanel would be able to resize it.

    The first concept anyone needs to learn when programming GWT is to understand why/how to create a chain/tree of unbroken RequiresResize-RequiresResize from a root resize panel. If your root of your resize chain/tree is not RootLayoutPanel, then you have to deliberately resize that root.

    In this case, you have made ResizeLayoutPanel the root of resize non-existent resize chain. Use another panel that implmements RequiresResize so that it could be resized by a parent - as well as making sure the parent is resizable manually by user or by another resizable parent.

    May I ask you to ask yourself, what is the reason for using ResizeLayoutPanel without providing a way to resize it and also without using it as a root of a resizing chain?

    0 讨论(0)
提交回复
热议问题