Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    FormItem.setIcons(FormItemIcon) does not work when FormItem.setCanEdit(false)

    Hi!

    I want to add a helpicon on a DateItem field. It works well as long as I not set it as readonly with the setCanEdit(false). But when setting the DateItem to setCanEdit(false), the icon disappears before the site is completely loaded.

    SmartGWT version: v4.1p_2017-12-21/PowerEdition

    Codesample:

    DateItem dateItem = new DateItem();

    FormItemIcon icon = new FormItemIcon();
    icon.setSrc("[SKIN]/actions/help.png");

    dateItem.setIcons(icon);
    dateItem.setIconPrompt("This is a help text");
    dateItem.setHoverWidth(200);
    dateItem.setCanEdit(false);

    #2
    Did you see FormItem.disableIconsOnReadOnly and FormItemIcon.neverDisable? Note that canEdit works in combination with readOnlyDisplay, and that setting can hide icons (eg, in "static" mode).

    Comment


      #3
      Originally posted by Isomorphic View Post
      Did you see FormItem.disableIconsOnReadOnly and FormItemIcon.neverDisable? Note that canEdit works in combination with readOnlyDisplay, and that setting can hide icons (eg, in "static" mode).
      FormItemIcon.neverDisable did the trick, now the icon still is there, and the dateitem is still readonly :) Thank you for the quick support

      Comment

      Working...
      X