AIMP Forum
AIMP for Windows => Skin Editor, Skin Engine => Вопросы / Questions => Topic started by: Reekawz on August 26, 2017, 01:46:09
-
Can someone please give me some example on how i can change the parent of an object using the ScriptableOperatorCounter, i did the script below but always have the error messages: ''I/O Error 105'', or "Invalid property type"
procedure Execute(var State: Integer);
var
Component: TComponent;
begin
Component := FindObject('button');
Component.parent := FindObject('containerA');
Component.parent := FindObject('containerB');
case State of
1:
begin
Component.BeginUpdate;
Component.Set('Component.Parent', ''containerA');
Component.EndUpdate;
end;
0:
begin
Component.BeginUpdate;
Component.Set('Component.Parent', 'containerB');
Component.EndUpdate;
end;
end;
end;
Thanks in advance.
-
It should looks like:
ACommonPanel := FindObject('tcpPlaybackControl');
ACommonPanel.Parent := FindObject('tcTrackInfo');
May be, in your case, one of the objects = nil?
-
hey! it worked! thanks for the reply :)