http://pivot.apache.org/tutorials/panels.html According to the (short) Panel tutorial, Panels do not perform any layout or sizing of their children. You will need to set the size & locations of any Component what you add to a Panel otherwise you will not see it as it will be 0 pixels wide and 0 pixels high.
If that doesn't help, then could you try to post a small, but complete example of the code you have so far? Something we can just unzip and run. I am having trouble understanding what is happening at the moment. It looks like you have seen the Drag & Drop tutorial. http://pivot.apache.org/tutorials/drag-and-drop.html The KitchenSink demo also have some Drag & Drop code that might be useful to you. http://pivot.apache.org/demos/kitchen-sink.html The source can be found here http://svn.apache.org/repos/asf/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/ http://svn.apache.org/repos/asf/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/KitchenSink.java http://svn.apache.org/repos/asf/pivot/trunk/tutorials/src/org/apache/pivot/tutorials/dragdrop.bxml Or you can download the entire Pivot source from the website http://pivot.apache.org/download.cgi#2.0 Chris On 19 August 2011 03:23, Camilo Casadiego <[email protected]> wrote: > Hi there! I'm trying to build an apparently simple component, the idea is > to have a Panel, and a contextual menu, the main idea is that the contextual > menu should popup one option and when I click the option a new small Panel > (or whatever container which could have more components inside) should apear > in place, this has to be dragable inside the container panel.**** > > ** ** > > Until the menu I have succeed, but when I try to add a new Panel defined > like this:**** > > ** ** > > <?xml version=*"1.0"* encoding=*"UTF-8"*?>**** > > <canvas:ItemCanvasController xmlns:bxml=*"http://pivot.apache.org/bxml"*** > ** > > xmlns=*"org.apache.pivot.wtk"* xmlns:canvas=* > "co.com.adv.salarixII.ui.controller.canvas"*>**** > > ** ** > > <Border bxml:id=*"itemBorder"* title=*"Nombre Item"* styles=* > "{padding:1}"***** > > xmlns:bxml=*"http://pivot.apache.org/bxml"* xmlns=* > "org.apache.pivot.wtk"*>**** > > <TabPane>**** > > <Label bxml:id=*"titleLabel"* text=*"Titulo"***** > > styles=*"{horizontalAlignment:'center',***** > > * verticalAlignment:'center', wrapText:true}"* />**** > > <Label bxml:id=*"contentLabel"* text=*"Contenido"***** > > styles=*"{horizontalAlignment:'center',***** > > * verticalAlignment:'center', wrapText:true}"* />**** > > <!-- <Label bxml:id="lContent" text="*Contenido*" > styles="{horizontalAlignment:'left', **** > > verticalAlignment:'center', wrapText:true}"/> -->* > *** > > </TabPane>**** > > </Border>**** > > </canvas:ItemCanvasController>**** > > ** ** > > he declaration of the managing class goes like this:**** > > ** ** > > public class ItemCanvasController extends Panel implements Bindable**** > > ** ** > > and the main panel is defined like this:**** > > ** ** > > <?xml version=*"1.0"* encoding=*"UTF-8"*?>**** > > <canvas:CanvasController xmlns:bxml=*"http://pivot.apache.org/bxml"***** > > xmlns=*"org.apache.pivot.wtk"* xmlns:canvas=* > "co.com.adv.salarixII.ui.controller.canvas"*>**** > > ** ** > > <bxml:script src=*"dragdrop.js"* />**** > > ** > > <!-- <ImageView bxml:id="imageView" image="*@plus.png*" > dragSource="$dragSoure" **** > > dropTarget="$dropTarget"/> -->**** > > </canvas:CanvasController>**** > > ** ** > > I don't know if the problem is maybe the container...or what...im a litlle > new in pivot and im a kind o lost...:s**** > > ** ** > > Any help will be really apreciated!**** > > ** ** > > *Kind Regards,***** > > **** > > [image: ::::ADV_Logo_CMYK300_Color.png]**** > > *Camilo Casadiego Espitia*** > > *Arquitecto de SW***** > > *(* + 57 1 6393000 **** > > * [email protected]**** > > *:* http://www.adv.com.co**** > > Carrera 11 No. 93 – 53 P7**** > > Bogotá - Colombia**** > > ** ** > > ** ** >
<<image001.png>>
