CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Starting with TIWCGJQFrame

by loufeliz » 26 Apr 2019 21:04

Hello,

I have a basic app that uses forms and I am thinking I need to convert it to use TIWCGJQFrame's so I can drop the TFrame holding my menu, and I think the app will look nicer. I have looked at the complete demo and see it uses frames, but am looking for a simple frame demo app. I looked at the JQShedulerFrame demo, but it does not run properly .

Is there another simple demo that works. I did find a helper unit in community code and will see if I can figure things out a bit more. Once I figure thisout, I need to renew my CGDev subscription so I can install into 10.2 with IW 15.


Using XE3, IW 14.2.7, CGDev 4.1.0.50

Cheers,

Lou
loufeliz
 
Posts: 61
Joined: 01 Dec 2012 04:39

by Alexander Bulei » 29 Apr 2019 16:16

Hi loufeliz,

You didn't find the plain code in JQueryDemoV3_IW14?
Something like this? :

delphi code
procedure TIWComponentForm.ShowFrame(AFrameClass: TIWCGFrameClass; AParams: TStringList);
var
IsAsync: Boolean;
begin
if not Assigned(AFrameClass) then Exit;

CGJQTabs.ActiveTab:= IWCGTabDemo;

IsAsync:= CGIsCallBackProcessing;
if IsAsync then
begin
// SINCE THE FRAME IS GOING TO BE RENDERED BY AJAX, DON'T NEED TO GENERATE AJAX RESPONSE.
CGCallBackDisableAjaxResponse;
end;
try
CreateNewFrame(AFrameClass);
FrameComp.ProcessCommand(0,AParams);
finally
if IsAsync then
begin
CGCallBackEnableAjaxResponse;
RenderRegionAsync(JQRegContainer,rramOldMethod,True);
end;

end;
end;

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by loufeliz » 30 Apr 2019 06:06

SimpleCGFrameDemo.zip
Hi Alexander,

After looking at that and the code for scheduler demo (couldnt get it to work), The code snippet you included in your reply is part of what make it work.
I was able to make a very simple demo that I am attaching here so that others may benefit from it.

Anyway, my simple demo derived from it , I believe, is the essence of what i am looking for. This will be an improvement in my current app where I am using TFrame to include menus across several forms. I can now just have a form with a menu in he header and just load the appropriate CGFrame.

If anyone has comments or improvements to my attached demo, please reply with corrections.

Cheers!
You do not have the required permissions to view the files attached to this post.
loufeliz
 
Posts: 61
Joined: 01 Dec 2012 04:39


Return to General

cron

Who is online

Users browsing this forum: No registered users and 4 guests

Contact Us.