Hello,
I am currently writting my own extension, i have done a small code part ^^ but i am blocked with the UI style
I am trying to add some controls headers and controls lines
one above the other on a constant background but without knowing the exact offset (or height) of each element, and each element can have one or more lignes and never the same height.
so is it possible please ? if it's possible can you help me to know how ?
I have actualy something like that :
Lua Code:
MMQTbg = WM:CreateControl("MMQT_Background", MMQTmain, CT_STATUSBAR)
MMQTbg:SetSimpleAnchorParent(0,0)
MMQTbg:SetResizeToFitDescendents(true)
function AddNewTitle(qindex, qlevel, qname)
if not MMQTlabel[qindex] then
MMQTlabel[qindex] = WM:CreateControl("MMQT_Label_"..qindex, MMQTbg , CT_LABEL)
if qindex == 1 then
local offsetTitle = 0
MMQTlabel[qindex]:SetSimpleAnchorParent(0,offsetTitle)
else
local offsetTitle = (qindex -1) * 25
MMQTlabel[qindex]:SetSimpleAnchorParent(0,offsetTitle)
end
end
MMQTlabel[qindex]:SetFont("ZoFontAnnounceMessage")
MMQTlabel[qindex]:SetText("["..qlevel.."] - "..qname)
end
for i=1, 6 do
AddNewTitle(qindex, qlevel, qname)
end
this code work fine, but i'm looking for a way to automatically place the object
Thanks in advance ^^