On Tue, Dec 20, 2011 at 09:31, Benjamin Dreux <[email protected]>wrote:
> Hi
> I'm wondering how could i change the text alignement of a table cell
> (all cell of a specific column)
> I found the class new qx.ui.table.cellrenderer.String
> But i can find out how to use it.
> I defined a specific align in the constructor, but the column is not
> align at right (the specified align string)
> Since this cell renderer inherit from the conditional, i'm wondering
> if it is required to make some condition to triggerer the specified
> align value.
>
> Is there any simplier way (working way) to change the alignement of a
> specific column.
>
Have a look first at
http://demo.qooxdoo.org/current/demobrowser/#table~Table.html which shows
how to specify a cell renderer for a specific column. In that case, it's
using the Boolean cell renderer, but it shows how you do it.
Next, look at the source for qx/ui/table/cellrenderer/Default.js and in
particular, the function _getStyleFlags(). In the default cell renderer, if
the "useAutoAlign" property is true, numbers are right-justified, and this
function is setting a flag to show that. The following function,
_getCellClass(), uses that flag to set a specific css class for the cell.
That class is defined in Abstract.js, so is available to any cell renderer.
Hopefully that gets you moving.
Derrell
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel