Announcement

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

    CanvaItem icons are drawn outsite of the item area

    Hi,

    I'm testing this with smartgwt-3.1p.2012-11-27.
    I need to create a CanvasItem with several icons, but I see that the icons are drawn outside of item area. See the attached a picture.
    I changed the PickerControlsSample and attached it to reproduce the case.

    Is it possible to draw the canvas item icon inside the item area like it happens for the other text items?
    Is it a bug or I didn't find the right setting?

    Regards,
    Mihnea
    Attached Files

    #2
    Probably that's because of some form padding/margin settings.

    Try to run

    Code:
    Canvas canvas = new Canvas();
    canvas.setBorder("1px solid black");
    setCanvas(canvas);
    And you will see, that there's no extra space between canvas and icons.

    I'm experiencing the same problem adding DynamicForm to CanvasItem. Please, post the solution here if you find it.

    Comment


      #3
      I've found a workaround

      Code:
      innerForm.setStyleName("cleanform");
      Code:
      .cleanform td
      {
          padding: 0;
      }
      Probably, there's a better way to fix it.

      Comment


        #4
        We have just made a change to the 3.1p and 4.0d codebase which should resolve this issue
        Please try the next nightly build (dated Dec 6 or higher) and let us know if you continue to see the problem

        Thanks and Regards
        Isomorphic Software

        Comment


          #5
          I don't see any changes in v8.3p_2012-12-06/PowerEdition Deployment (built 2012-12-06)...

          Comment


            #6
            Aha - we just fixed a bug with surprisingly similar symptoms to the problem you're having but a totally different cause - sorry for the confusion.
            This is not actually a bug - as you've already determined the space is coming from per cell padding on the DynamicForm.
            You can simply call 'setCellPadding(0)' on your form to resolve this

            Regards
            Isomorphic Software

            Comment


              #7
              Please see the attached files:
              - picker-icons-case-2.png - is current version (using the version from 2012-12-06)
              - picker-icons-case-2-expected.png - is what I expect to be

              I didn't mean that small space between the form item and the icon. That is a small difference, but it's good that was also clarified.
              I meant the big difference between the other text items and the canvas item. The canvas item icon is not aligned with the other icons, it's outside of the item drawing area.
              Is it possible to configure the canvas item to look like in the "expected" picture?
              Attached Files

              Comment


                #8
                You can use TextItem.setWidth().

                Comment


                  #9
                  I did. See the code: canvasItem.setWidth("*");
                  And I would not like to use: canvasItem.setWidth(200);
                  where 200 would make all the items icons vertically aligned.

                  Comment


                    #10
                    Any news on this issue?

                    Comment


                      #11
                      Yes - we have a fix for this issue which will be making it to the public nightly builds (3.1p and 4.0d) tonight.

                      Please pick up a build dated Dec 11 or higher to see the fix and let us know if you continue to have difficulties with this

                      Thanks
                      Isomorphic Software

                      Comment

                      Working...
                      X