multiline cells in Tables

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

multiline cells in Tables

rsantiagopaz
(sorry the english..)

well, some little questions or comments.

1) I was reading about Html cellrenderers, rich labels, HeighForWidth, and any other topics I suppose related, but I still cannot understand if is posible have multiline cells on Tables, with "auto-height" in every row related to content extension of cells.
I need only a short confirmation, negative or positive, if you think it's posible do this, in "reasonably standard" way.


2) Table is a great widget. I miss only one thing, a "focus/blur signal", like Tree for example or other widgets.
I build a alternative, playing with FocusedCell, selected rows, getFocusedRow, etc. Works fine in my applications, with single selection, but is not the optimal I think. With multiple selection my variant not work.


3) We can fill the model of the Trees with a Json, Store and Controllers, etc, etc.
But this procedure only make TreeFolders. How we can set TreeFiles with a Json from server. Is this possible, in "reasonably standard" way?
Reply | Threaded
Open this post in threaded view
|

Re: multiline cells in Tables

Derrell Lipman
On Wed, May 5, 2010 at 13:04, rsantiagopaz <[hidden email]> wrote:

1) I was reading about Html cellrenderers, rich labels, HeighForWidth, and
any other topics I suppose related, but I still cannot understand if is
posible have multiline cells on Tables, with "auto-height" in every row
related to content extension of cells.
I need only a short confirmation, negative or positive, if you think it's
posible do this, in "reasonably standard" way.

It is not possible to have variable row heights in a table. In other words, all rows must be the same height. That doesn't prevent having cells that have multiple lines of text, though. If you set the row height to be large enough, e.g. with table.setRowHeight(40); you could then have a cell renderer that rendered two lines (or more, if your row height is sufficient) for a single cell.
 
2) Table is a great widget. I miss only one thing, a "focus/blur signal",
like Tree for example or other widgets.
I build a alternative, playing with FocusedCell, selected rows,
getFocusedRow, etc. Works fine in my applications, with single selection,
but is not the optimal I think. With multiple selection my variant not work.

That "should" be easy to do. Subclass qx.ui.table.pane.Pane and in your subclass, add a new event, e.g. "changeFocus", and override the setFocusedCell method to fire that event whenever it's called and the focussed cell has actually changed.

You can then make your table use the subclass by using the "custom" parameter to the Table constructor. Call your constructor like this:

var custom =
{
  tablePane : function(obj)
                   {
                      return new my.custom.Pane()
                   }
};

var table = new qx.ui.table.Table(tableModel, custom);
 


3) We can fill the model of the Trees with a Json, Store and Controllers,
etc, etc.
But this procedure only make TreeFolders. How we can set TreeFiles with a
Json from server. Is this possible, in "reasonably standard" way?

Someone else more knowledgable about data binding than I will have to answer this as it relates to data binding. There is very little difference, however, between a TreeFolder and a TreeFile. The biggest difference is that a TreeFolder can have children. If you just don't assign any children to it, and you set the openSymbolMode property to either "never" or "auto", then the open/close symbol will not appear. Maybe that solves your problem?

Cheers,

Derrell


------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: multiline cells in Tables

rsantiagopaz
Very good Derrel, thanks.
About the 3, yes, I thought in the same way. But by curiosity I need to know if it were predicted in the controllers design.