The code works fine, but when you load the plugin with the Plugin Manager it generates an error massage. After the first resizing it works fine.
The magic is to define the resizable controls bevor the size define of the window.
Code:
ListWindow = class(Turbine.UI.Lotro.Window);
function ListWindow:Constructor()
Turbine.UI.Lotro.Window.Constructor(self);
--- define section for resizable controls
--- define section for resizable controls
self:SetSize(Settings.listWidth, Settings.listHeight);
self:SetMaximumSize(500,1200);
self:SetMinimumSize(300,200);
self:SetResizable(true);
--- Here should be the creation of our child controls
end
function ListWindow:SizeChanged(args)
Settings.listWidth, Settings.listHeight = self:GetSize();
-- Resize our child windows
self.listTree:SetSize(Settings.listWidth-20, Settings.listHeight-50);
self.listScrollBar:SetHeight(Settings.listHeight-50);
self.listScrollBar:SetLeft(Settings.listWidth-20);
end
The reason is that "self:SetSize(Settings.listWidth, Settings.listHeight);" calls the function "SizeChangend". At this time the objects are still unknown in the plugin.