erich.wanker Posted July 17, 2013 Share Posted July 17, 2013 If i use TuniPanel.collapsible=true then the UniPanel starts at runtime "open" .. I use a workarround in my Mainform-onCreate: UniSession.AddJS((self.Components[i] as TUniPanel).JSName+'.collapse();'); to close all TuniPanels with collapsible=true; But this doesnt´t work in TUniFrames - onCreate ... cause "UniSession" ... is unknowen Any suggestions ... Thank you Link to comment Share on other sites More sharing options...
erich.wanker Posted July 18, 2013 Author Share Posted July 18, 2013 ok ... i made a dirty workaround for the TUniFrame - thing ;-) procedure TMainForm.InsertFrame1(Name: string;wo:TuniPanel); var i:Integer; begin if FFrameName1=Name then Exit; FFrameName1:=Name; FreeAndNil(FCurrentFrame1); FCurrentFrame1:=TUniFrameClass(FindClass(Name)).Create(self); FCurrentFrame1.Align:=alClient; FCurrentFrame1.Parent:=wo; for i:=0 to FCurrentFrame1.ComponentCount-1 do begin if FCurrentFrame1.Components[i].ClassName = 'TUniPanel' then begin if (FCurrentFrame1.Components[i] as TUniPanel).Collapsible = true then begin UniSession.AddJS((FCurrentFrame1.Components[i] as TUniPanel).JSName+'.collapse();'); end; end; end; end; hope anybody can use this .. :-) ..or has a better solution .. Link to comment Share on other sites More sharing options...
aln02 Posted July 18, 2013 Share Posted July 18, 2013 Try add uniGUIApplication to uses clause of UniFrame and use setTimeout For example: UniSession.AddJS('setTimeout(function(){'+pnl_dop.JSName+'.collapse()}, 10);'); Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now