Jenec | 6 Oct 13:39

Composite: "There is already a widget in this cell"


I am positioning widgets using qx.ui.container.Composite() and need to
replace content of certain rows in it, but of course I always get a message:
Error: There is already a widget in this cell (7, 1). 
So all I need to know is how to remove content of cell (7,1) before
inserting another widget.
I tried to insert widgets into Composite using addAt() method and remove
them using removeAt(), but it doesn't work.
Thanks for your ideas.
--

-- 
View this message in context: http://www.nabble.com/Composite%3A-%22There-is-already-a-widget-in-this-cell%22-tp19836283p19836283.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Jenec | 6 Oct 14:20

Re: Composite: "There is already a widget in this cell"


Of course, I mean Composite with qx.ui.layout.Grid
--

-- 
View this message in context: http://www.nabble.com/Composite%3A-%22There-is-already-a-widget-in-this-cell%22-tp19836283p19836843.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Fabian Jakobs | 7 Oct 09:38
Favicon

Re: Composite: "There is already a widget in this cell"

Jenec schrieb:
> I am positioning widgets using qx.ui.container.Composite() and need to
> replace content of certain rows in it, but of course I always get a message:
> Error: There is already a widget in this cell (7, 1). 
> So all I need to know is how to remove content of cell (7,1) before
> inserting another widget.
>   
Before you can assign a new widget to a grid cell you need to remove the 
old widget from the cell. If you know which widget currently occupies a 
cell you can simply remove it "container.remove(oldWidget)". If you 
don't know the widget you can get a reference to it by querying the 
layout "container.getLayout().getCellWidget(7, 1)" and then remove this 
widget from the container.

> I tried to insert widgets into Composite using addAt() method and remove
> them using removeAt(), but it doesn't work.
> Thanks for your ideas.
>   
The methods "removeAt" and "addAt" are a bit misleading, when using a 
grid. They define the order of the child widgets are in the children 
array. Some layouts like the box layout use this information but it has 
no meaning for the grid. The grid only uses the layout options to 
position its children.

Best Fabian

--

-- 
Fabian Jakobs
JavaScript Framework Developer

(Continue reading)


Gmane