0

Portallayout, panels and events

asked 2009-12-27 09:07:31 +0800

andersviklund gravatar image andersviklund
93 2

updated 2009-12-27 13:27:48 +0800

Hi,

how can I get the width of the moved portal child after it has been moved?

<portallayout onPortalMove='alert("portalChildMoved");'>
<portalchildren width="70%" id="portalchildrenleft"/>
<portalchildren width="30%" id="portalchildrenright"/>
</portallayout>


Panel panel = new Panel();
panel.setHeight("420px");
panel.setTitle("Title");
panel.setBorder("normal");

portalchildrenleft.insertBefore(panel,portalchildrenleft.getFirstChild());

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-12-27 21:13:27 +0800

duxb gravatar image duxb
24

portallayout.addEventListener("onPortalMove", new EventListener()
{
public void onEvent(Event event) throws Exception
{
PortalMoveEvent portalMoveEvent = (PortalMoveEvent)event;
}
{

link publish delete flag offensive edit

answered 2009-12-28 04:34:59 +0800

andersviklund gravatar image andersviklund
93 2

Thanks duxb, now I can grab the dragged panel, but I still can't get the width.

This returns null:
portalMoveEvent.getDragged().getWidth()

and this returns 30% or 70%:
portalMoveEvent.getTo().getWidth()

I need to get the width/height of the dragged panel in pixels, so I can re-size the contents after the panel has been moved.

link publish delete flag offensive edit

answered 2009-12-28 20:47:25 +0800

sankarsk gravatar image sankarsk
33

First of all the moved panel automatically re-sized according to the your portalchildren width.

If you want panel width you need to specify the width while creating the panel.
like, panel.setWidth("420px");

link publish delete flag offensive edit

answered 2009-12-28 20:59:49 +0800

sankarsk gravatar image sankarsk
33

In portal layout, three more defects i am posted in this forum..

http://www.zk1.org/forum/listComment/10700
http://www.zk1.org/forum/listComment/10681
http://www.zk1.org/forum/listComment/10680

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-12-27 09:07:31 +0800

Seen: 573 times

Last updated: Dec 28 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More