CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

a thought-balloon window

by Luckman » 15 Sep 2014 19:49

Hi - not sure where to post this question on the forum but I need to display messages in an iphone-style format with little thought boxes around each one. Is the best way to achieve that with a grid and overriding the row atttributes for a background image? Or another component? Attached is a sample of what the client wants.
You do not have the required permissions to view the files attached to this post.
Luckman
 
Posts: 80
Joined: 03 Aug 2014 19:59

by Jorge Sousa » 15 Sep 2014 20:39

Hi the closest we have are these
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Luckman » 16 Sep 2014 00:25

I need to list messages, one after the other, just formatted in a thought balloon. How does a tool tip accomplish that?
Luckman
 
Posts: 80
Joined: 03 Aug 2014 19:59

by Jorge Sousa » 16 Sep 2014 09:17

having seeing you're picture again.

Well what you need is much more.....

I can only think in appending html to a region,

var
html: string;
js: string;
begin
html:= some html;
js:= Format('$("#%s").append(%s);',[Region1.HTMLName,CGJsEscape(Html)]);
WebApplication.AddToInitProc(js); // if called oncreate / onrender
or
WebApplication.CallbackResponse.AddJavascriptToExecute(js); // If Ajax event
// or CGAddJavaScriptToAjaxResponse(js);
end;
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by George » 16 Sep 2014 20:20

Luckman wrote:Hi - not sure where to post this question on the forum but I need to display messages in an iphone-style format with little thought boxes around each one. Is the best way to achieve that with a grid and overriding the row atttributes for a background image? Or another component? Attached is a sample of what the client wants.

Hello!
First of all, i must let you know, that what you want is possible in CGDT.

More info:
You need main region, when all message will be added.
Each message should be another region.
You can make your custom design, for example using adobe reflow.
When your design is ready, you must create template regions inside IDE (do not place it in region list).
This templates will represent server side message objects.
Now most interesting, you need tricky procedure to duplicate template regions to "list" region.
You can use variable rlist:TList<tiwcgjqregion> to access to your dynamic regions.
Or you can make own wrapper class and make rlist:TList<tMyMessage>.
delphi code
tMyMessage = class
Region: tiwcgjqregion;
LabelControl: Tiwcgjqlabelex;
e.t.c.
end

This is not so easy, but works.
Best regards!
George
 
Posts: 486
Joined: 23 May 2013 15:50
Location: Russia, Moscow

by Jorge Sousa » 17 Sep 2014 10:56

We know from Lucky and by skype, that he decided to use jqgrid, which is a very good solution.

Mainly because will be possible to remove and update a message easily, without resending the whole html
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58

by Luckman » 21 Sep 2014 02:43

Yeah well, the grid idea is bad and your HTMLSnippet idea is good. I guess I needed to figure that out on own. :-)
Luckman
 
Posts: 80
Joined: 03 Aug 2014 19:59


Return to General

cron

Who is online

Users browsing this forum: No registered users and 11 guests

Contact Us.