No...no.
See, you add that window/control to the window when you make the window itself, starting off with a background color so you can place and size it correctly. Once you do that, the only thing you have to put in your conditional is switching mouse visible on and off. eg:
Code:
SetupWindow = class(Olenn.DUInterface.Window );
function SetupWindow:Constructor()
Olenn.DUInterface.Window.Constructor( self,380,225 );
self.moveBlocker=Turbine.UI.Window();
self.moveBlocker:SetParent(self);
--Width should be about 25px less than self's width
self.moveBlocker:SetSize(355,35);
self.moveBlocker:SetPosition(0,0);
-- remove following line after you make sure it's placed correctly
self.moveBlocker:SetBackColor(Turbine.UI.Color(0,0,0));
self.moveBlocker:SetZOrder(20);
--next line will make it so window can be moved by default
--omit it if you want the opposite (SetMouseVisible defaults to true)
self.moveBlocker:SetMouseVisible(false);
Then your initial conditional
Code:
if ( SetupWindow.locked:IsChecked(true) ) then
self.moveBlocker:SetMouseVisible(true);
else
self.moveBlocker:SetMouseVisible(false);
end
finally an event handler example:
Code:
SetupWindow.locked.CheckChanged = function (sender,args)
self.moveBlocker:SetMouseVisible(SetupWindow.locked:IsChecked());
end