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

  • Button: Icon position

    Hi Isomorphic,

    is it possible for this "com.smartgwt.client.widgets.Button;" sets a constant position of the icon, e.g. 20px far away from begin.
    (Something like: setAlign("left") and moved 20px to the right).

    Click image for larger version  Name:	iconPosition.gif Views:	1 Size:	38.0 KB ID:	255459
    12.0 version.

    I read a docs and tried with commands "setAlign("left")" and "setIconSpacing(int)", but that's not what I exactly wants because I have more buttons in the same row, but other buttons are not changing text and icon position so I don't have this problem with them.
    All buttons should looks similar (with same style).

    Best regards
    Last edited by pavo123; 11th Oct 2018, 05:52.

  • #2
    Your alignment call is correct, but the browser is still reorganizing placement when the title changes because there isnít enough room for the specified CSS padding.

    You could reduce the CSS padding for either this one button to for all buttons if you donít want this behavior when thereís too little space. Another option would be to make that button large enough to accommodate the padding.


    • #3
      I've solved the problem. Thank you for this hints!