onViewerResize - event of object PmiRoot
The event fires if panel window size is changed (panel viewer). The event can be used for changing the position and size of graphic items based on the current panel window size.
|pMe||(Object) Reference to the graphic item where the event rises.|
|pEvent||(Object) A referrence to object describing detailed information about the specific event.| pEvent.Dx
)New panel window size of X axis (in pixels).
)New panel window size of Y axis (in pixels).
In this event, it is possible to adapt the size of the panel itself or the individual graphic items to the current panel window size. The size of panel content is represented by the size of PmiRoot
graphic item. The panle size change can be done by changing the values Dx
of the PmiRoot
This event is also functional for Web panels
An example of the event content. The panel size is adapted to current size of panel window. In this process the position and size of individual graphic items are not modified. Only the panel size is modified (wihout scrollbars). For changing position and size of selected graphic items, these must be modified individually.
Example of event content. The panel size and position of some graphic items is adapted to the current panel window size. The panel has its defined minimal size defined in the panel editor when panel is created. If the panel window gets smaller than that, scrollbars will appear. But if the panel window gets bigger, the size and position of some graphic items will be changed as follows:
- the main central item (e.g. table) (t0) - gets larger/smaller in defined direction
- items to the right from the table (e.g. buttons) (br0, br1) - move in horizontal direction
- items under the table (e.g. buttons) (bd0, bd1) - move in vertical direction