Jump to content

grid panels


Holec

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

 

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

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...