Ability to change the font of the columnlist rows.

This commit is contained in:
maromaroXD 2021-07-16 12:38:53 +01:00
parent 36995a68c7
commit 4e71c7ce84

View File

@ -980,5 +980,26 @@ function newobject:SetColumnOrder(curid, newid)
end
--[[---------------------------------------------------------
- func: SetRowsFont(font)
- desc: sets the font of the rows.
--]]---------------------------------------------------------
function newobject:SetAllRowsFont(font)
local list = self.internals[1]
for k, v in ipairs(list.children) do
v:SetFont(font)
end
end
--[[---------------------------------------------------------
- func: SetRowFont(font, id)
- desc: sets the font of the row with the provided id.
--]]---------------------------------------------------------
function newobject:SetRowFont(font, id)
local list = self.internals[1]
assert( id >= 1, "The id must be >= 1")
list.children[id]:SetFont(font)
end
---------- module end ----------
end