Ejemplo n.º 1
0
        /// <summary>
        /// Set the default cell alignment for a row. This alignment can be overridden on a per cell basis by setting the cell’s content widget’s alignX and alignY properties.
        /// If on a grid cell both row and a column alignment is set, the horizontal alignment is taken from the column and the vertical alignment is taken from the row.
        /// </summary>
        /// <param name="row">Row index</param>
        /// <param name="hAlign">The horizontal alignment. Valid values are “left”, “center” and “right”.</param>
        /// <param name="vAlign">The vertical alignment. Valid values are “top”, “middle”, “bottom”</param>
        /// <returns>This object (for chaining support)</returns>
        public Grid SetRowAlign(int row, AlignXEnum hAlign, AlignYEnum vAlign)
        {
            var map = new Map()
                      .Add("hAlign", hAlign)
                      .Add("vAlign", vAlign);

            _rowAlign[row] = map;

            CallClientMethod(
                new qxDotNet.Core.ClientMethodCall("setRowAlign")
                .SetKeyParameter(row)
                .SetParameter(hAlign)
                .SetParameter(vAlign));

            return(this);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Set the default cell alignment for a column. This alignment can be overridden on a per cell basis by setting the cell’s content widget’s alignX and alignY properties.
        /// If on a grid cell both row and a column alignment is set, the horizontal alignment is taken from the column and the vertical alignment is taken from the row.
        /// </summary>
        /// <param name="column">Column index</param>
        /// <param name="hAlign">The horizontal alignment.Valid values are “left”, “center” and “right”.</param>
        /// <param name="vAlign">The vertical alignment. Valid values are “top”, “middle”, “bottom”</param>
        /// <returns>This object (for chaining support)</returns>
        public Grid SetColumnAlign(int column, AlignXEnum hAlign, AlignYEnum vAlign)
        {
            var map = new Map()
                      .Add("hAlign", hAlign)
                      .Add("vAlign", vAlign);

            _columnAlign[column] = map;

            CallClientMethod(
                new qxDotNet.Core.ClientMethodCall("setColumnAlign")
                .SetKeyParameter(column)
                .SetParameter(hAlign)
                .SetParameter(vAlign));

            return(this);
        }