Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Styling and refresh problem



Permlink Replies: 6 - Last Post: Mar 7, 2018 12:06 AM Last Post By: Gerrit Schurer
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Styling and refresh problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 1, 2018 5:40 AM
Hi there,

I'm having a very strange problem with two of my applications. Both have an IWCGJQImage on the main form. Both have a master template, an own form-template, a TIWTemplateProcessor and a css file. As one application is derived from the other there are hardly any differences so far. I compared the text versions of the above mentioned objects and the text versions of the servercontroller and usersession unit. I cannot see any differences in settings, but maybe I overlooked one.

The applications both show good in (for example) Chrome and Edge. My StyleRenderOptions are the same for the image in both applications and it is perfectly depending on the CSS. The problem is the way the applications react to a resize of the window (or a refresh). One of the applications has no trouble at all; the page is rendered fine. The other one makes a mess of it. Inspecting the objects within Google shows the second application is (after the resize) hardcoding the style to the image (and to every other visual object on the screen). I'm certain I checked all StyleRenderOptions off !

Perhaps I overlooked a setting in Intraweb (or CGDEV) or did something stupid, but I can't find the solution. What could possibly cause this strange behavior ? Maybe someone has an idea where to look ?
Jose Nilton Pace


Posts: 122
Registered: 5/15/98
Re: Styling and refresh problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 1, 2018 7:43 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
Hi Gerrit. Try in StyleRenderOptions of IWCGJQImage set:
RenderFont := False;
RenderPostition := False;
RenderSize := False;
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: Styling and refresh problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2018 6:32 AM   in response to: Jose Nilton Pace in response to: Jose Nilton Pace
Hi Jose,

I tried your possible solution of course ! I already had rhe StylerenderOptions set to false in the object inspector and doing this once more in the source made no difference. Thanks for taking the trouble to answer my question. I think I found the solution in, what I think, an error

best regards,
Gerrit
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: Styling and refresh problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 2, 2018 6:29 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
It wasn't easy, but I think I found the problem. I created a new IW project and put only three objects on the form : a TIWCGJQImage, a TIWImage and a TIFImageFile. For all three I used the same PNG file. I put all the StyleRenderOptions to false and gave them each a CSS (one, two, three). In the CSS file all three images where given an absolute position. I started the application and it turned out to be just as expected: three perfectly lined-up images.

Then I added an OnResize event to the form. I only put a semicolon in the procedure and started the application again. When resizing, the IWCGJQ image jumped to a different position because of the style that was added to the element (which it should not have been doing...).

I reported this error to the CGDev team, but maybe it has something to do with the OnResize in Intraweb ?
Alexandre Machado

Posts: 1,754
Registered: 8/10/13
Re: Styling and refresh problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 3, 2018 2:33 AM   in response to: Gerrit Schurer in response to: Gerrit Schurer
Gerrit Schurer wrote:
It wasn't easy, but I think I found the problem. I created a new IW project and put only three objects on the form : a TIWCGJQImage, a TIWImage and a TIFImageFile. For all three I used the same PNG file. I put all the StyleRenderOptions to false and gave them each a CSS (one, two, three). In the CSS file all three images where given an absolute position. I started the application and it turned out to be just as expected: three perfectly lined-up images.

Then I added an OnResize event to the form. I only put a semicolon in the procedure and started the application again. When resizing, the IWCGJQ image jumped to a different position because of the style that was added to the element (which it should not have been doing...).

I reported this error to the CGDev team, but maybe it has something to do with the OnResize in Intraweb ?

No it has not. OnResize event is basically a server only event. It doesn't re-render any component. If CG controls do something like rendering style again during OnResize event, then it is out of IW control.
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: Styling and refresh problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 7, 2018 12:05 AM   in response to: Alexandre Machado in response to: Alexandre Machado
I posted the problem to the support of CG. We are working (=emailing) on it. I'll let you know the outcome.
Gerrit Schurer

Posts: 20
Registered: 3/19/04
Re: Styling and refresh problem
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 7, 2018 12:05 AM   in response to: Alexandre Machado in response to: Alexandre Machado
I encountered a server error when posting. Again : I posted the problem to the support of CG. We are working (=emailing) on it. I'll let you know the outcome.

Edited by: Gerrit Schurer on Mar 7, 2018 12:06 AM
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02