Columns order in a XUL tree

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Columns order in a XUL tree

guido-32
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
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: Columns order in a XUL tree

guido-32
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...)

On 25.05.2012 14:42, guido wrote:

> 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
> _______________________________________________
> dev-tech-xul mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-tech-xul


--
Guido Parente
[hidden email]

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

_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: Columns order in a XUL tree

guido-32
(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.

On 25.05.2012 14:46, guido wrote:

> 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...)
>
> On 25.05.2012 14:42, guido wrote:
>> 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
>> _______________________________________________
>> dev-tech-xul mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-tech-xul
>
>


--
Guido Parente
[hidden email]

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

_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul
Reply | Threaded
Open this post in threaded view
|

Re: Columns order in a XUL tree

Neil-4
In reply to this post by guido-32
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.
_______________________________________________
dev-tech-xul mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xul