Sets the size limit of a specific column.

        :param column_name: The name of the column to change.
        :param size_limit: The max size of the column width.
8659
def set_column_size_limit(self, column_name: str, size_limit: int):
        
        if self._column_size_map.get(column_name):
            self._column_size_map[column_name] = size_limit
        else:
            raise ValueError(f'There is no column named {column_name}!')
684904
def smartResizeColumnsToContents( self ):
        
        self.blockSignals(True)
        self.setUpdatesEnabled(False)
        
        header = self.header()
        header.blockSignals(True)
        
        columns = range(self.columnCount())
        sizes = [self.columnWidth(c) for c in columns]
        header.resizeSections(header.ResizeToContents)
        
        for col in columns:
            width = self.columnWidth(col)
            if ( width < sizes[col] ):
                self.setColumnWidth(col, sizes[col])
        
        header.blockSignals(False)
        
        self.setUpdatesEnabled(True)
        self.blockSignals(False)
1050778
private void setSessionsTableColumnSizes() {

		sessionsTable.getColumnModel().getColumn(0).setMinWidth(60);
		sessionsTable.getColumnModel().getColumn(0).setPreferredWidth(60); // active

		sessionsTable.getColumnModel().getColumn(1).setMinWidth(120);
		sessionsTable.getColumnModel().getColumn(1).setPreferredWidth(200); // name

		sessionsTable.getColumnModel().getColumn(3).setMinWidth(100);
		sessionsTable.getColumnModel().getColumn(3).setPreferredWidth(150); // matched
	}
1357349
def change_column_width(column_index, width_in_chars = RubyXL::ColumnRange::DEFAULT_WIDTH)
      change_column_width_raw(column_index, ((width_in_chars + (5.0 / RubyXL::Font::MAX_DIGIT_WIDTH)) * 256).to_i / 256.0)
    end
1277147
def resizeColumnsToContents(self, startCol=None, stopCol=None):
        
        numCols = self.model().columnCount()
        startCol = 0 if startCol is None else max(startCol, 0)
        stopCol  = numCols if stopCol is None else min(stopCol, numCols)

        row = 0
        for col in range(startCol, stopCol):
            indexWidget = self.indexWidget(self.model().index(row, col))

            if indexWidget:
                contentsWidth = indexWidget.sizeHint().width()
            else:
                contentsWidth = self.header().sectionSizeHint(col)

            self.header().resizeSection(col, contentsWidth)
626721
def set_name(self, name):
        

        if len(name) > 6:
            raise ArgumentError("Name must be at most 6 characters long", name=name)

        if len(name) < 6:
            name += ' '*(6 - len(name))

        self.name = name
230500
def limit(self, r=5):
        
        try:
            self.df = self.df[:r]
        except Exception as e:
            self.err(e, "Can not limit data")
1285613
void setSize(int size) {
        if (this.size != 0) {
            final String fmt = "column size is known: %d";
            final String msg = format(fmt, this.size);
            throw new IllegalStateException(msg);
        }
        this.size = size;
        this.hash = hash();
    }
1343979
def size_col(col) #:nodoc:
      # Look up the cell value to see if it has been changed.
      if @col_sizes[col]
        width = @col_sizes[col]

        # Convert to pixels.
        if width == 0
          pixels = 0
        elsif width < 1
          pixels = (width * (MAX_DIGIT_WIDTH + PADDING) + 0.5).to_i
        else
          pixels = (width * MAX_DIGIT_WIDTH + 0.5).to_i + PADDING
        end
      else
        pixels = @default_col_pixels
      end
      pixels
    end
198711
def column_options
      { limit: column.limit, default: column.default, null: column.null }
    end
988784
def set_column_sizes(self, values):
        
        self.style['grid-template-columns'] = ' '.join(map(lambda value: (str(value) if str(value).endswith('%') else str(value) + '%') , values))
1353851
protected void setColumnsFinalWidth() {
        log.debug("Setting columns final width.");
        float factor;
        int printableArea = report.getOptions().getColumnWidth();

        //Create a list with only the visible columns.
        List visibleColums = getVisibleColumns();


        if (report.getOptions().isUseFullPageWidth()) {
            int columnsWidth = 0;
            int notRezisableWidth = 0;

            //Store in a variable the total with of all visible columns
            for (Object visibleColum : visibleColums) {
                AbstractColumn col = (AbstractColumn) visibleColum;
                columnsWidth += col.getWidth();
                if (col.isFixedWidth())
                    notRezisableWidth += col.getWidth();
            }


            factor = (float) (printableArea - notRezisableWidth) / (float) (columnsWidth - notRezisableWidth);

            log.debug("printableArea = " + printableArea
                    + ", columnsWidth = " + columnsWidth
                    + ", columnsWidth = " + columnsWidth
                    + ", notRezisableWidth = " + notRezisableWidth
                    + ", factor = " + factor);

            int acumulated = 0;
            int colFinalWidth;

            //Select the non-resizable columns
            Collection resizableColumns = CollectionUtils.select(visibleColums, new Predicate() {
                public boolean evaluate(Object arg0) {
                    return !((AbstractColumn) arg0).isFixedWidth();
                }

            });

            //Finally, set the new width to the resizable columns
            for (Iterator iter = resizableColumns.iterator(); iter.hasNext(); ) {
                AbstractColumn col = (AbstractColumn) iter.next();

                if (!iter.hasNext()) {
                    col.setWidth(printableArea - notRezisableWidth - acumulated);
                } else {
                    colFinalWidth = (new Float(col.getWidth() * factor)).intValue();
                    acumulated += colFinalWidth;
                    col.setWidth(colFinalWidth);
                }
            }
        }

        // If the columns width changed, the X position must be setted again.
        int posx = 0;
        for (Object visibleColum : visibleColums) {
            AbstractColumn col = (AbstractColumn) visibleColum;
            col.setPosX(posx);
            posx += col.getWidth();
        }
    }
1015485
def _resizeColumnToContents(self, header, data, col, limit_ms):
        """"""
        hdr_width = self._sizeHintForColumn(header, col, limit_ms)
        data_width = self._sizeHintForColumn(data, col, limit_ms)
        if data_width > hdr_width:
            width = min(self.max_width, data_width)
        elif hdr_width > data_width * 2:
            width = max(min(hdr_width, self.min_trunc), min(self.max_width,
                        data_width))
        else:
            width = max(min(self.max_width, hdr_width), self.min_trunc)
        header.setColumnWidth(col, width)
1128695
def set_size(self, size):
        
        if not isinstance(size, baseinteger):
            raise TypeError("size can only be an instance of type baseinteger")
        self._call("setSize",
                     in_p=[size])
122854
def set_col_width(self, col, tab, width):
        """"""

        try:
            old_width = self.col_widths.pop((col, tab))

        except KeyError:
            old_width = None

        if width is not None:
            self.col_widths[(col, tab)] = float(width)
962968
def _resizeColumnsToContents(self, header, data, limit_ms):
        """"""
        max_col = data.model().columnCount()
        if limit_ms is None:
            max_col_ms = None
        else:
            max_col_ms = limit_ms / max(1, max_col)
        for col in range(max_col):
            self._resizeColumnToContents(header, data, col, max_col_ms)
1164294
def _shrink(self):
        
        cursize = self._current_size
        while cursize > self._maxsize:
            name, value = self.dynamic_entries.pop()
            cursize -= table_entry_size(name, value)
        self._current_size = cursize