On Fri, Feb 20, 2009 at 3:05 PM, Gereon A. Frey <[email protected]> wrote:
> Hi,
>
> I accidentally replied to Derrell alone. Therefore I'm going to
> summarize the outcome of our conversation.
>
> * Derrell Lipman <[email protected]> [090220 17:14]:
> > On Fri, Feb 20, 2009 at 10:57 AM, Gereon A. Frey <[email protected]>
> wrote:
> > > I'm using some tree virtuals (maybe I should substitute them by simple
> > > trees but that would be another question/remark) and found the
> > > highlighting of the focused cell pretty slow. This can be seen in the
> > > demo browser too (with the spam folder open). I tried to disable the
> > > focus using setCellFocusAttributes (setting background color to
> > > transparent as suggested in the documentation), but the magic in the
> named
> > > function is commented out.
> > I think you're looking at old documentation. The use of "transparent" was
> > for 0.7, not the current 0.8 qooxdoo code.
> >
> > You can disable the cell focus indicator with
> > table.setShowCellFocusIndicator(false);
> >
> > You can also disable the highlighting of the focused row with
> > table.highlightFocusedRow(false);
> it wasn't old documentation (the setCellFocusAttributes method could be
> removed from the TreeVirtual class I think; the documentation should be
> updated at least).
Yes, that function is obsolete. I'll deprecate it for now so peoples'
programs don't break, and then at some point we'll get rid of it.
> The major problem was a misunderstanding on my side.
> I mixed up _row_ and _cell_ focus indicators. The following example
> helps to find out what the different indicators are and how they can be
> controlled:
>
> var doc = this.getRoot();
>
> var tree = new qx.ui.treevirtual.TreeVirtual([ 'Column 1', 'Column 2' ]);
> tree.set({width:500});
> doc.add(tree, { left:10, top:10, bottom:10 });
>
> tree.setAlwaysShowOpenCloseSymbol(false);
> tree.setStatusBarVisible(false);
>
> // Change the boolean values in the following calls to see the effects.
>
This is done by default in the TreeVirtual constructor because one almost
never wants cell focus indicators in a tree. Cell focus can be enabled if
desired by passing <i>true</i> to this method:
> tree.setShowCellFocusIndicator(false);
>
And just for completeness, in SVN there's a convenience method so that
instead of doing this:
> tree.getDataRowRenderer().setHighlightFocusRow(false);
>
one need only do
tree.setHighlightFocusRow(false);
and it deals with setting it in the data row renderer for you.
Derrell
> var resizeBehavior = tree.getTableColumnModel().getBehavior();
> resizeBehavior.set(0, { width:"1*", minWidth:260 });
> resizeBehavior.set(1, { width:100, minWidth:100 });
>
> var dModel = tree.getDataModel();
> var rootNode = dModel.addBranch(null, 'root', true, false);
> var node1 = dModel.addBranch(rootNode, 'node1', true, false);
> var node2 = dModel.addBranch(rootNode, 'node2', true, false);
>
> for (var i = 0; i < 100; i++)
> {
> dModel.addLeaf(node1, 'leaf ' + i);
> dModel.addLeaf(node2, 'leaf ' + i);
> }
>
> dModel.setData();
>
> Cheers,
> Gereon
>
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel