erich.wanker Posted July 17, 2013 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 Quote
erich.wanker Posted July 18, 2013 Author 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 .. Quote
aln02 Posted July 18, 2013 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);'); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.