Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Columns order in a XUL tree

31 views
Skip to first unread message

guido

unread,
May 25, 2012, 8:42:48 AM5/25/12
to dev-te...@lists.mozilla.org
Hello All,

I've a xul tree where some columns are defined into a .xul file and some
are dinamically created at run-time.

Once all the columns are added to the tree, I need to change their
displayed order.

I tried to modify the ordinal* attribute but I can't make it to work.

Which one would be best method to do it?

Many thanks in advance,
Guido.

(*) https://developer.mozilla.org/en/XUL/Attribute/ordinal

guido

unread,
May 25, 2012, 8:46:37 AM5/25/12
to dev-te...@lists.mozilla.org
Forgot to say: I've also tried to use the DOM insertBefore() method but
also this way doesn't work (for some reason the column is added /after/
the reference column...)
> _______________________________________________
> dev-tech-xul mailing list
> dev-te...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-xul


--
Guido Parente
guido....@dots.de

dots Software GmbH
Schlesische Straße 27, 10997 Berlin, Germany
Telefon: +49 - (0)30 - 695 799 - 30
www.dots-software.com

Amtsgericht Berlin Charlottenburg HRB 65201
Geschäftsführer: Olaf Lorenz, Ken Osuga

guido

unread,
May 25, 2012, 9:02:24 AM5/25/12
to dev-te...@lists.mozilla.org
(I apologize for the multiple mails)

I particularly don't understand why the children order of the <treecols>
is not reflected in the displayed order of the columns.

For example, I've this structure :

<treecols>
<treecol id=A/>
<treecol id=B/>
<treecol id=C/>
</treecols>

but the columns are then displayed in this order : C, A, B.

Why? What is that ultimately regulate this order and how can I change it?

Many thanks again.

Neil

unread,
May 25, 2012, 12:18:19 PM5/25/12
to
guido wrote:

> I've a xul tree where some columns are defined into a .xul file and
> some are dinamically created at run-time.
>
> Once all the columns are added to the tree, I need to change their
> displayed order.
>
> I tried to modify the ordinal* attribute but I can't make it to work.
>
> Which one would be best method to do it?

The tree tries to maintain the order internally. In particular, the
column ordinals are all alternate odd numbers so that splitters can be
put in between if required. Alternatively I suppose you could try
calling the _reorderColumn function to move your dynamic column.

--
Warning: May contain traces of nuts.
0 new messages