EGL Development User Group

Expand all | Collapse all

How to add an image between TextView

  • 1.  How to add an image between TextView

    Posted Tue November 10, 2020 05:10 PM
      |   view attached
    Dear export,
    I have rows TextView in egl UI pages, I need to add images in the page to help the rows of TextRows meaningful.
    I used an Image control in the Palette, but I cannot make it work.  My code is :
        CRSRAILIMG Image{ layoutData = new AttachmentLayoutData{
    attachmentTypeTop = CommonLibrary.ViewLib.TYPE_PARENT, offsetTop = 168,
    attachmentTypeLeft = CommonLibrary.ViewLib.TYPE_PARENT, offsetLeft = 374,
    attachmentTypeRight = CommonLibrary.ViewLib.TYPE_NONE,
    attachmentTypeBottom = CommonLibrary.ViewLib.TYPE_NONE,
    offsetRight = 70,
    offsetBottom = 71},
    position="absolute",
    src = "images/bitmaps/CRSSRAIL.png",
    text = "IMG"
    };
    I attached the display.
    Could you please teach me how to display image in EGL UI.

    Thanks,

    Eric

    ------------------------------
    Eric Zuo
    ------------------------------

    Attachment(s)



  • 2.  RE: How to add an image between TextView

    Posted Wed November 11, 2020 07:51 AM
    can you tell me what AttachmentLayoutData is? i dont see that as a widget in any egl library.


    ------------------------------
    nick jones
    ams
    englewood cliffs NJ
    ------------------------------



  • 3.  RE: How to add an image between TextView

    Posted Wed November 11, 2020 11:14 PM
    Hi Nick,
    First thank you very much for your reply. It is automatically added when I select Image from the palette in IBM Rational® Business Developer  Version: 9.5.1  
    it is:
    com.sync.egl.rui.layout.AttachmentLayoutData
    Contents:
    offsetBottom int
    targetBottom string
    targetEdgeBottom string
    attachmentTypeBottom string
    offsetRight int
    targetRight string
    targetEdgeRight string
    attachmentTypeRight string
    offsetLeft int
    targetLeft string
    targetEdgeLeft string
    attachmentTypeLeft string
    offsetTop int
    targetTop string
    targetEdgeTop string
    attachmentTypeTop string

    Thank you again,
    Eric

    ------------------------------
    Eric Zuo
    ------------------------------



  • 4.  RE: How to add an image between TextView

    Posted Thu November 12, 2020 01:57 AM

    Hi Eric,

     

    com.sync.egl.rui.layout.AttachmentLayoutData should be a third party widget from Synchrony. You'll need to contact them for assistance.

     

    Regards,

    JiYong Huang

    Senior Technical Specialist

    RBD, HCL Software, HCL Technologies Ltd.

    Cell: +86-13426427893

    EGL Development User Group

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 5.  RE: How to add an image between TextView

    Posted Thu November 12, 2020 11:46 AM
    Hi JiYong,
    Thanks for your instruction. But it is hard to contact the third party. 
    I would like to change the code, does EGL has a way to add Image/grapgy icon in UI page? There should be.  My image icon is just a decoration, not need to be clickable. My application run on Tomcat8. I searched online, no luck to find a description.
    Please help again.
    Thanks,

    Eric




    ------------------------------
    Eric Zuo
    ------------------------------



  • 6.  RE: How to add an image between TextView

    Posted Thu November 12, 2020 12:12 PM

    Hi Eric,

    just use the Image widget.

    infoimg image{src="icons/info.jpg"};

    then use it like you would any widget.



    ------------------------------
    nick jones
    ams
    englewood cliffs NJ
    ------------------------------



  • 7.  RE: How to add an image between TextView

    Posted Thu November 12, 2020 12:54 PM
    Hi Nick, JiYong
    We here use   layoutData = new AttachmentLayoutData{ ...}  a lot for positioning controls ( EGL calls control as widget, am I right?). When I add the Image from Plalette (RBD9.5.1), it automatically use  AttachmentLayoutData. I searched, and cannot find the contact infor of the compaly for com.sync.egl.rui.layout.AttachmentLayoutData
    I have to position the Image related to the left upper corner (offsetleft, offsettop) 
    Could you please forward instruction /sample for how to achieve the positioning if not use AttachmentLayoutData? 
    I have good experience in JSP/Java, and ASPX/C#.net, VB.NET, but new in EGL. Please help more.
    Thanks,
    Eric



    ------------------------------
    Eric Zuo
    ------------------------------



  • 8.  RE: How to add an image between TextView

    Posted Thu November 12, 2020 01:31 PM
    i would just use css to position what you need. so create a css for image and assign using the class keyword


    image image{class='positionclass'};


    ------------------------------
    nick jones
    ams
    englewood cliffs NJ
    ------------------------------



  • 9.  RE: How to add an image between TextView

    Posted Thu November 12, 2020 07:48 PM

    Hi Eric,

     

    You are using an EGL framework from Synchrony. It is a little similar to the relationship of Spring vs. Java. Unlike Spring, the Synchrony framework is private and very likely not open source. It seems like your page are structured by AttachmentLayout which is part of the framework. Except the creator or expert, I don't think others can help you on this since we never use it or have the documentation/sample/source code of it. My suggestion is still to contact Synchrony or check if you had gotten any materials about the framework (you should have when you first create/migrate your application). You can also try to explore the API or source code of it if you have. For example, select the AttachmentLayout in the source code editor and press F3 to go into the definition of it and learn the API there.

     

    Regards,

    JiYong Huang

    Senior Technical Specialist

    RBD, HCL Software, HCL Technologies Ltd.

    Cell: +86-13426427893

    EGL Development User Group

     

    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 10.  RE: How to add an image between TextView

    Posted Fri November 13, 2020 11:51 AM
    Hi JiYong
    I used AttachmentLayoutData just for the same style as the existed code. I have to change it to CSS to handle the position. It works for my purpose now, a good workaround. I like it.
    This issue is resolved.
    Thank you very much, it is a wonderful group!  i
    and thank Nick.

    Eric


    ------------------------------
    Eric Zuo
    ------------------------------