colWidthSet
Sets the column width of the requested column, only if the user didn't supply their own col_widths slice. Otherwise ignore the change.
Parameters
- self:*GridWidget
- *GridWidget
- col_num:usize
- usize
- width:f32
- f32
Source
Implementation
pub fn colWidthSet(self: *GridWidget, col_num: usize, width: f32) void {
if (col_num >= self.col_widths.len) {
dvui.log.debug("GridWidget {x} col_num {d} is greater than number of columns {d} ignoring col_width change\n", .{ self.data().id, col_num, self.col_widths.len });
return;
}
if (self.cols == .num_cols) {
self.col_widths[col_num] = @max(self.col_widths[col_num], width);
}
}