EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
  • 1.  Center an image inside a Portlet

    Posted Tue March 31, 2015 12:58 PM

    Hi all

    i would center an image inside a portlet using utils.portal on com.ibm.egl.rui.dojo.samples_2.1.3.. 

    this is my source

     titleField.text = " My Logo ";        box image{src = "css/classic01.jpg  " , align= center };        addPortlet(createPortlet(box), 1);

    and attached the image result

    can some one help me to solve this problem ?

    thanks

    giocot


  • 2.  Re: Center an image inside a Portlet

    Posted Tue April 07, 2015 03:10 AM

    Please try:

    titleField.text = " My Logo ";box image{src = "icons/ctool16/map_16.gif"  };portlet Portlet = createPortlet(box);portlet.content.alignment = Boxlib.ALIGN_CENTER;addPortlet(portlet, 1);

     

    That is, you must set the alignment of the container so that the widget inside the container can have the expected alignment.

    HuangJiYong