Add columnlist:SetDefaultColumnWidth and columnlist:GetDefaultColumnWidth

This commit is contained in:
Kenny Shields 2014-08-23 21:17:09 -04:00
parent c5157379ae
commit 8ee4ba4a74
2 changed files with 23 additions and 1 deletions

View File

@ -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

View File

@ -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