Set custom column widths with 0 representing the first column.

@param array $columnWidths
@throws \InvalidArgumentException
546441
public function setFixedColumnWidths(array $columnWidths)
    {
        if ($columnWidths !== array_filter($columnWidths, 'is_numeric')
            || array_keys($columnWidths) !== array_filter(array_keys($columnWidths), 'is_int')
        ) {
            throw new \InvalidArgumentException('Array must contain integer keys and numeric values only!');
        }

        $this->columnWidths = $columnWidths + $this->columnWidths;
    }
916792
public void setWidth(int width) {

        if (width <= 0) {
            m_containerElement.getStyle().clearWidth();
            m_width = -1;
        } else {
            m_containerElement.getStyle().setWidth(width, Unit.PX);
            m_width = width;
        }
    }
395692
private function executeColumnWidths(): void
  {
    $this->loadOldColumns();

    $this->loadColumns();

    $this->enhanceColumns();

    $this->mergeColumns();

    $this->writeColumns();
  }
41778
public function setColumnNames(array $names)
    {
        if ($this->featureCount !== 0 && count($names) !== $this->featureCount) {
            throw new InvalidArgumentException(sprintf('Length of the given array should be equal to feature count %s', $this->featureCount));
        }

        $this->columnNames = $names;

        return $this;
    }
400162
public void setWidth(double width) {
        switch (type) {
            case BOX:
                box.setWidth(width);
                box.setDepth(width);
                break;
            case CYLINDER:
                cylinder.setRadius(width * 0.5);
                break;
            default:
                break;
        }
    }
1026103
public function setWidth($width)
    {
        if (!is_null($width)) {
            if (intval($width) < 0) {
                throw new \InvalidArgumentException(sprintf('Invalid width: %d', $width));
            }

            $this->width = intval($width);
        } else {
            $this->width = null;
        }

        return $this;
    }
542561
def set_xlsx_colwidths(worksheet, fld2col_widths, fldnames):
        """"""
        for col_idx, fld in enumerate(fldnames):
            col_width = fld2col_widths.get(fld, None)
            if col_width is not None:
                worksheet.set_column(col_idx, col_idx, col_width)
637438
public function setWidth($width)
    {
        $this->width = null;
        if ($width && is_numeric($width)) {
            $width = (int) $width;
            if ($width > 0) {
                $this->width = $width;
            }
        }
    }
949045
public function setTextareaDimensions($cols = null, $rows = null)
    {
        if ($cols) {
            $this->fields['default']->cols = $cols;
        }
        if ($rows) {
            $this->fields['default']->rows = $rows;
        }
    }
344143
public function setIndentWidth($indentWidth)
    {
        if (!is_null($indentWidth) &&
            (!is_int($indentWidth) || $indentWidth < 1)
        ) {
            throw new \InvalidArgumentException(
                'indentWidth needs to be null or an integer above 0'
            );
        }

        $this->indentWidth = $indentWidth;

        return $this;
    }
387642
public function setColumns($columns, $size = null)
    {
        if (is_null($size)) {
            $size = $this->baseSize;
        }
        $columnAttribute = $size . 'Columns';
        $this->{$columnAttribute} = $columns;
    }
889303
public function setWidth($width) {
        if (!is_numeric($width) || $width <= 0) {
            return;
        }
        if ($width > self::MAX_WIDTH) {
            $this->_width = self::MAX_WIDTH;
        } else {
            $this->_width = (int)$width;
        }
    }
1272408
public final void setWidth(final int width) {
        if (style == Style.LIST_COLUMNS && (getDeviceType(context) == DeviceType.TABLET ||
                getOrientation(context) == Orientation.LANDSCAPE)) {
            columnCount = 2;
        } else if (style == Style.GRID) {
            int padding = context.getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_grid_item_horizontal_padding);
            int itemSize = context.getResources()
                    .getDimensionPixelSize(R.dimen.bottom_sheet_grid_item_size);
            columnCount = ((getDeviceType(context) != DeviceType.TABLET &&
                    context.getResources().getConfiguration().orientation ==
                            Configuration.ORIENTATION_PORTRAIT ?
                    context.getResources().getDisplayMetrics().widthPixels : width) - 2 * padding) /
                    itemSize;
        } else {
            columnCount = 1;
        }

        rawItems = null;
        notifyDataSetChanged();
    }
1206150
public function setMaxColumns($columns, $size = null)
    {
        if (is_null($size)) {
            $size = $this->baseSize;
        }
        $columnAttribute = 'max' . ucfirst($size) . 'Columns';
        $this->{$columnAttribute} = $columns;
    }
576235
public function setWidth($width)
    {
        if (!is_numeric($width)) {
            throw new \LogicException('Box width is NaN!');
        }

        $this->width = (int) $width;

        return $this;
    }
183522
function set_column_width($j, $width) {
    if ( $this->_columns_locked ) {
      return;
    }
    
    $col =& $this->get_column($j);
    $col["used-width"] = $width;
    $next_col =& $this->get_column($j+1);
    $next_col["x"] = $next_col["x"] + $width;
  }
1046127
public function setColumnMaxWidth(int $columnIndex, int $width): self
    {
        if (!$this->output->getFormatter() instanceof WrappableOutputFormatterInterface) {
            throw new \LogicException(sprintf('Setting a maximum column width is only supported when using a "%s" formatter, got "%s".', WrappableOutputFormatterInterface::class, \get_class($this->output->getFormatter())));
        }

        $this->columnMaxWidths[$columnIndex] = $width;

        return $this;
    }