diff --git a/objects/columnlist.lua b/objects/columnlist.lua index 22221c7..614b022 100644 --- a/objects/columnlist.lua +++ b/objects/columnlist.lua @@ -25,6 +25,7 @@ function newobject:initialize() self.selectionenabled = true self.multiselect = false self.startadjustment = false + self.canresizecolumns = true self.children = {} self.internals = {} self.resizecolumn = nil @@ -909,4 +910,27 @@ function newobject:GetDefaultColumnWidth() return self.defaultcolumnwidth +end + +--[[--------------------------------------------------------- + - func: SetColumnResizeEnabled(bool) + - desc: sets whether or not the object's columns can + be resized +--]]--------------------------------------------------------- +function newobject:SetColumnResizeEnabled(bool) + + self.canresizecolumns = bool + return self + +end + +--[[--------------------------------------------------------- + - func: GetColumnResizeEnabled() + - desc: gets whether or not the object's columns can + be resized +--]]--------------------------------------------------------- +function newobject:GetColumnResizeEnabled() + + return self.canresizecolumns + end \ No newline at end of file diff --git a/objects/internal/columnlist/columnlistheader.lua b/objects/internal/columnlist/columnlistheader.lua index 2d9e846..829f0e8 100644 --- a/objects/internal/columnlist/columnlistheader.lua +++ b/objects/internal/columnlist/columnlistheader.lua @@ -154,7 +154,7 @@ end --]]--------------------------------------------------------- function newobject:mousepressed(x, y, button) - if not self.parent.resizecolumn then + if not self.parent.resizecolumn and self.parent.canresizecolumns then local box = self.resizebox local col = loveframes.util.BoundingBox(x, box.x, y, box.y, 1, box.width, 1, box.height) if col then