diff --git a/objects/columnlist.lua b/objects/columnlist.lua index 9a0b101..b0ed59f 100644 --- a/objects/columnlist.lua +++ b/objects/columnlist.lua @@ -15,6 +15,7 @@ function newobject:initialize() self.type = "columnlist" self.width = 300 self.height = 100 + self.defaultcolumnwidth = 100 self.columnheight = 16 self.buttonscrollamount = 200 self.mousewheelscrollamount = 1500 @@ -885,4 +886,25 @@ function newobject:ResizeColumns() self.internals[1]:RedoLayout() end +end + +--[[--------------------------------------------------------- + - func: SetDefaultColumnWidth(width) + - desc: sets the object's default column width +--]]--------------------------------------------------------- +function newobject:SetDefaultColumnWidth(width) + + self.defaultcolumnwidth = width + return self + +end + +--[[--------------------------------------------------------- + - func: GetDefaultColumnWidth() + - desc: gets the object's default column width +--]]--------------------------------------------------------- +function newobject:GetDefaultColumnWidth() + + return self.defaultcolumnwidth + end \ No newline at end of file diff --git a/objects/internal/columnlist/columnlistheader.lua b/objects/internal/columnlist/columnlistheader.lua index 7d881e0..2d9e846 100644 --- a/objects/internal/columnlist/columnlistheader.lua +++ b/objects/internal/columnlist/columnlistheader.lua @@ -16,7 +16,7 @@ function newobject:initialize(name, parent) self.parent = parent self.name = name self.state = parent.state - self.width = 80 + self.width = parent.defaultcolumnwidth self.height = parent.columnheight self.columnid = 0 self.hover = false