CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

IWCGHTMLSnippet and IWCGJQLabelMarquee

by EitanArbel » 26 Jan 2015 18:53

hi,.

first i want to apologize if this is not the right place to ask that, but i couldn't find the right place for IWCGHTMLSnippet or IWCGJQLabelMarquee.

i have this code :
Code: Select all
{------------------------------------------------------------------------------}
procedure TfrmLogin.IWAppFormCreate(Sender: TObject);
Var S : String;
begin
  S:='<marquee behavior="scroll" direction="up" scrollamount="1"  scrolldelay="10" onmouseover="this.stop();" onmouseout="this.start();">'+
      '<P align="center"><img src="/Images/SomeImage.jpg" width="25%">'+
      '<br><B><U><FONT face="Arial" size="3"><a href="www.SomeAddress.com" target="_blank">SomeHeadline : </a></FONT></U></B>'+
      '<FONT face="Arial" size="3"><a href="www.SomeAddress.com" target="_blank">some info</a></FONT><P></marquee>';

  IWCGHTMLSnippet1.HTMLCode.Text:=S;
end;
{------------------------------------------------------------------------------}



i tried both IWCGHTMLSnippet and IWCGJQLabelMarquee for this, but i get some strange behavior:

IWCGHTMLSnippet :
1. i set it to Height:=282, and width:=165. no matter how much i change it's size(in runtime or design), the visible height is always maximum ~200 pixels in runtime - you can see that it shows only what's inside it's borders, if the border is visible.
2. using onmouseover="this.stop();" and onmouseout="this.start();" - doesn't show any effect. it keeps scrolling anyway.
3. in the code : width="25%", shouldn't it be 25% of the original image size? it show it as 25% of the width of the IWCGHTMLSnippet.


IWCGJQLabelMarquee:
1. it doesn't show the borders.
2. how can i add a clickable link, and an image(like i want it in the code here) please?


Thanks!
EitanArbel
 
Posts: 115
Joined: 16 Jul 2013 22:27

by Alexander Bulei » 27 Jan 2015 11:00

Hi EitanArbel,

About IWCGHTMLSnippet:

We can't teach you the html, if you want use the html, you have to know the language.

About IWCGJQLabelMarquee:

1. it doesn't show the borders.


Check BorderOptions.

2. how can i add a clickable link, and an image(like i want it in the code here) please?


Use html tags:

delphi code
IWCGJQLabelMarquee.Text:= '<a href="#">Test Link</a>';


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 EitanArbel » 27 Jan 2015 13:18

i'm not asking about html.
the html i showed here is good and working.
my question is why doesn't it work in the IWCGHTMLSnippet?
i'm asking that because when i try it in a TMS component - it works, and when i try it in AToZed's Label - it works too, so why doesn't it work in IWCGHTMLSnippet?
also tried it in a clean empty project - still not working.

please see the IWCGHTMLSnippet questions

Thanks
EitanArbel
 
Posts: 115
Joined: 16 Jul 2013 22:27

by Alexander Bulei » 27 Jan 2015 13:32

Your code works as exptected here.
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 EitanArbel » 27 Jan 2015 14:38

sorry for my english, maybe the 2 screen shots and a new clean project that i attach here, can explain me better then my english :)

Thanks
You do not have the required permissions to view the files attached to this post.
EitanArbel
 
Posts: 115
Joined: 16 Jul 2013 22:27

by Alexander Bulei » 27 Jan 2015 15:04

Hello,

As I said before, you need learn html for use it...

Just add this style to marquee tag:

html code
style="width: 100%; height: 100%;"


27-01-2015 14-05-20.png


What is your version of cgdevtools?

Check for StyleOptions.RenderSize property.
You do not have the required permissions to view the files attached to this post.
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 EitanArbel » 27 Jan 2015 16:46

ok, so i don't know simple html and i promise i wont bother you with html questions again.
but for now, can you help me please?

can you show evertyhing you put inside S please (the full text in S), just to see if i missed something ?
does the text pause when you move the mouse over it?

i set StyleRenderOptions.RenderSize:=True, like you said, and also cleared the cache (just to be sure).
and here is what i put in S, and the sizes and onmouseover still doesn't work :

S:='<marquee style="width: 100%; height: 100%;" behavior="scroll" direction="up" scrollamount="1" scrolldelay="10" onmouseover="this.stop();" onmouseout="this.start();">'+
'<P align="center"><img src="/Images/Image.jpg">'+
'<br><B><U><FONT face="Arial" size="3"><a href="www.SomeSite.com" target="_blank">Some Headline : </a></FONT></U></B>'+
'<FONT face="Arial" size="3"><a href="www.SomeSite.com" target="_blank">blah blah blah some text</a></FONT><P></marquee>';


however, if i use :
S:='<marquee style="width: 165px; height: 280px;" behavior=...
it DOES change the size, but the OnMouseOver still doesn't work.

here are the versions of software i use :
Delphi XE5 Update 2
Inraweb 14.0.34
CGDevTools ver 2.3.0.89
tested on Firefox 27, and IE 11 - same result

Thanks
EitanArbel
 
Posts: 115
Joined: 16 Jul 2013 22:27

by Alexander Bulei » 27 Jan 2015 17:05

Hi,

Attached full worked demo.
Next time, you will need the premium support for this questions...

Note:
Html marquee is a obsolete tag.
To make sure of cross-browser compatibility, think on replacement with CSS3.

Useful article:

http://www.w3.org/TR/html5/obsolete.html#the-marquee-element-0
http://webdesign.about.com/od/css3tutorials/a/marquee-in-css.htm

Best Regards.
You do not have the required permissions to view the files attached to this post.
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 EitanArbel » 27 Jan 2015 18:41

size still doesn't change...
changing the size with px is working fine, but changing with % is not working.
i'm ok with it.

i don't know why are you being rude, and this attitude to me.
you keep telling me how much i don't know html (and i agree with you on that), but even in the last answer, you add this :
Code: Select all
if BrowserIsFirefox(WebApplication.Browser) then
    CtrlCmd:= ' onmouseover="javascript:this.setAttribute(''scrollamount'',''0'');" onmouseout="javascript:this.setAttribute(''scrollamount'',''1'');" '
  else
    CtrlCmd:= ' onmouseover="this.stop();" onmouseout="this.start();" ';

so it's not just about the lack of knowledge i have in html, right?

you are saying that everything works fine for you, and i'm trying to tell you that there IS a problem somewhere.
i don't know what is the source of the problem.
it could be a wrong combination of the wrong versions of Delphi/IW/CG/whatever..

i don't mind working with px instead of %, i just wanted to point out that there IS a problem.
the problem is probably on my side, but i'm "pretty" sure it's not about knowing html or not...
the thing is that the SAME source, works on your computer, and not working on mine.
doesn't that seem like a real problem?
EitanArbel
 
Posts: 115
Joined: 16 Jul 2013 22:27

by Alexander Bulei » 28 Jan 2015 11:01

Hi EitanArbel,

As I said before, Our component IWCGHTMLSnippet allow you insert your custom html code, in other words, put your html in page.

Certainly, the problem is in your html code.

I post many useful links, so please read them.

you keep telling me how much i don't know html (and i agree with you on that), but even in the last answer, you add this :


Yes, I add this because you did not see the links I posted.
FireFox need another code/behavior to stop/start deprecated html tag <marquee>

If you want closer support, you need premium support.

P.S: Update the IW & CGD to latest version.

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


Return to General

Who is online

Users browsing this forum: No registered users and 71 guests

Contact Us.