Closed Bug 204142 Opened 21 years ago Closed 6 years ago

<tree> needs a public method for moving columns

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jag+mozilla, Unassigned)

References

Details

Attachments

(2 files)

This will allow clients to programmatically reorder columns in their trees.
I think |moveColumn| is a bit better name for this than |reorderColumn|. But in
talking to sspitzer perhaps we could have something like

<method name="moveColumn">
  <parameter name="colMove"/>
  <parameter name="colBefore"/>
  <body><![CDATA[
    if (colBefore)
      this._reorderColumn(colMove, colBefore, true);
    else
      this._reorderColumn(colMove, this.lastOrdinalChild, false);
  ]]></body>
</method>
  
}
Jan: let me know which approach you like best.
No longer blocks: 195285
So I've talked with hewitt about this and we both agreed that something like

// move colMove directly before or after colInsert
moveColumn(colMove, colBefore, aBefore);

would probably be simplest in use. My suggestion in comment 1 (always move
before unless the second arg is null) would put the burden on the client of
finding the next column if they want to move after, the details and knowledge of
which I think we can more cleanly hide inside tree.xml.

This suggestion isn't quite patch 122273, I don't think that code currently
deals correctly with aBefore being false for anything but the last column.
>// move colMove directly before or after colInsert
>moveColumn(colMove, colBefore, aBefore);

looks good
The bug that needed this worked around this for now.
Keywords: nsbeta1+
Blocks: 232349
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: shrir → xptoolkit.widgets
Assignee: jag → nobody
I don't think anyone is going to work on this given the plan to remove the XUL "tree" widget (bug 1446335).
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: