Holec Posted December 14, 2012 Share Posted December 14, 2012 Hi, my task is to make something most similair to this: http://dev.sencha.com/deploy/ext-4.0.1/examples/portal/portal.html As it is ExtJS demo, is there any chance to make it in uniGUI? Excuse my question if it is dumb and I missed anything - I am new to this framework and I didn't find this in forum / demos. Implementation: at first, I thought about mix of panels and frames, secondly I thought about placing panels into the StringGrid cells (if it could be done) and now I see ExtJS has components exactly for this job. But how can I access them? Anyone with some help please? Fine day, Jiri Holec Quote Link to comment Share on other sites More sharing options...
Holec Posted December 14, 2012 Author Share Posted December 14, 2012 Ok, I see it is possible through Client events - there is OnResize event and UniPanel can get desired style like this: function OnBeforerender(sender) { sender.draggable = true; sender.collapsible = true; sender.title= 'Some title'; } Even I can use setPosition(x,y) as it is shown in the demo. So I can do whole "position logic" through JS. BUT - how I get for example this newly set position back into Delphi? For example there exists request on me to save the positions of this panels for each user. In theory, I could save it to cookies, but better way is save it to database for each login... Thanks for advice. Jiri Holec Quote Link to comment Share on other sites More sharing options...
Holec Posted December 14, 2012 Author Share Posted December 14, 2012 BUT - how I get for example this newly set position back into Delphi? For example there exists request on me to save the positions of this panels for each user. In theory, I could save it to cookies, but better way is save it to database for each login... ok, sry for bothering, solved If anyone interested: as lema wrote in "How ti fire Ajax event from HTML in TuniHTMLFrame" you could 1) place Ajax call in events you need - for example function OnMove(sender, x, y) { ajaxRequest( sender , "OnMove" , [ "X=" + x, "Y=" + y ]); } for determining the movement function OnCollapse(p) { ajaxRequest( p , "OnCollapse" , [ "Title=" + p.title ]); } for detection that panel is collapsed (and same case for OnExpand...) 2) handle OnAjaxEvent event with parsing sent data - you get something like this: in event name: OnMove in params: Ajax=1 IsEvent=1 Obj=O2F Evt=OnMove X=135 Y=14 _S_ID=WPZYzLcevtcmrgl _seq_=3 Where the important things are Event name (which you set in JS previously) and in params the "Obj" and yours params of course Have a fine day, Jiri Holec 1 Quote Link to comment Share on other sites More sharing options...
albertovesx Posted December 15, 2012 Share Posted December 15, 2012 Thank you. Quote Link to comment Share on other sites More sharing options...
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.