Announcement

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

    Missing API: setShowHandCursor for ListGridField of type ListGridFieldType.IMAGE

    Hi Isomorphic,

    I have a ListGridField with an icon like the flag icon in this example (v11.0p_2017-03-29).
    Code:
    ListGridField countryCodeField = new ListGridField("countryCode", "Flag", 40);
    countryCodeField.setAlign(Alignment.CENTER);
    countryCodeField.setType(ListGridFieldType.IMAGE);
    countryCodeField.setImageURLPrefix("flags/16/");
    countryCodeField.setImageURLSuffix(".png");
    Is it possible that you add an API that on icon-hover there is a hand-cursor shown (like for ImgButton)?
    The reason behind this: I have an click handler on the containing cell via ListGrid.addCellClickHandler() and want to show that the icon is not for display purposes only, but also has a function.

    From the intended effect it is the the hand-cursor you added here.

    I'm using latest 5.1p, but 6.1d would also be OK.

    Best regards
    Blama

    #2
    Use listGridFieldType "icon" for an interactive icon. The field type you are using here is for a data-related icon, which is assumed non-interactive.

    Comment


      #3
      Hi Isomorphic,

      this does not result in the "hand" pointer, see this sample with changed field definition:
      Code:
              {name:"countryCode", title:"Flag", width:50, type:"icon", icon:"flags/16/US.png"},
      Best regards
      Blama

      Comment


        #4
        The cursor changes if you add a valueIconClick handler (see docs for listGridField.valueIcons).

        Comment


          #5
          Hi Isomorphic,

          I checked your solution in SmartClient (not SmartGWT), and I can't get the hand cursor to show up:

          Code:
          {name:"actionField", width:50, type:"icon", cellIcon:"flags/16/US.png", valueIconClick: function(){console.log("x"); return false}},
          Framework creates clickable icons by using formatCellValue with isc.Canvas.imgHTML and an undocumented parameter extraCSSText, so that's not a solution I want to use.

          Currently I work around it by using createRecordComponent on grid level (where I can also set prompt text for my icon). A workaround that also works is using 'valueIcons: {undefined: "icon address"}', but it looks like framework abuse.

          Comment

          Working...
          X