Merge pull request #15 from Tourahi/master

Ability to change the font of the columnlist rows.
This commit is contained in:
Caldas Lopes 2021-07-29 10:11:19 +01:00 committed by GitHub
commit b8a82b51a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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