Lets say I will be inserting 10 different text label into a frame that has the UIListLayout in it, i’d have to manually edit their size, i want to make it so if there is not much TextLabel then the current ones would get as big enough to fill the frame fully and if theres alot of textlabel they’d get smaller to fill the frame fully.
so my question is, is it possible to make something like this Without scripting it detailed. If so, how?
function UpdateSize(Frame:Frame)
local Num = 0
for i, v in pairs(Frame:GetChildren())
if v:IsA("TextLabel") then
Num += 1
end
end
local Size = 1/Num
for i, v in pairs(Frame:GetChildren())
if v:IsA("TextLabel") then
v.Size = UDmi2.Scale(Num, v.Size.Scale.Y)
end
end
end
not sure if this is gonna work cus I didn’t test it… let me know if it won’t
Oh sorry that was an syntax mistake, replace that script with this one
function UpdateSize(Frame:Frame)
local Num = 0
for i, v in pairs(Frame:GetChildren())
if v:IsA("TextLabel") then
Num += 1
end
end
local Size = 1/Num
for i, v in pairs(Frame:GetChildren())
if v:IsA("TextLabel") then
v.Size = UDmi2.Scale(Num, v.Size.Y.Scale)
end
end
end