Announcement

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

    ToolStrip issues (missing icons & a bug?)

    1. Question about the availability of icons used in samle

    I realized that newly featured ToolStrip sample (http://www.smartclient.com/smartgwt/showcase/#toolstrip_new_category) makes use of icons that seem not to be part of the standard themes. "/images/[Menu/?]icons/16/document_plain_new.png" is the icon uri, which i can't find anywhere in the provided theme folders.
    - can I anyway use these icons (by copying from the sample page) from a licence point of view?
    - do you provide these icons somewhere else?

    2. Bug in ToolStripMenuButton.setIcon ?
    ToolStripMenuButton.setIcon seems not work and the referenced icon won't show up. I used following syntax
    Code:
    ToolStripMenuButton menuButton = getToolStripMenuButton();
    menuButton.setIcon("myIconUrl/icon.png");
    addMenuButton(menuButton);

    #2
    Missing skin icons

    There are also a major problem with the ToolStripMenuButton class which refer to files in "[MODULE]/sc/skins/[SKIN]/images/ToolStrip/button" but that directory does not exist. In fact, those files all exist inside "[MODULE]/sc/skins/[SKIN]/images/button". Was that a typo? This should be corrected soon.

    Comment


      #3
      am I the only one with this issue?

      Comment


        #4
        I saw the same problem while using a ToolStripMenuButton, wheere in every skin except Enterprise and EnterpriseBlue, there was an image appearing under the button title.

        I worked around the appearance issue as follows:

        toolStripMenuButton.setSkinImgDir("../Enterprise/images/");

        Comment


          #5
          What about ToolStripMenuButton.setIcon? How can we workaround this?

          Comment


            #6
            Slightly old thread, but to answer the OP, the icons come from here and are available for free: http://www.famfamfam.com/lab/icons/silk/

            And to put a +1 for ToolStripMenuButton.setIcon - this method also does not seem to work for me. Is it due to the fact the icon is overriden by the default down arrow trigger icon?

            Comment


              #7
              you can use a workaround:
              String imgHTML = Canvas.imgHTML(imgPath, 16, 16);
              menuButton.setTitle(imgHTML + "Title");

              Comment


                #8
                Hi everybody,

                i'm facing the same problem with skinning of ToolStripButton and ToolStripMenuButton...
                my smart gwt jar files are coming from the maven repository: http://www.smartclient.com/maven2

                the skins Enterprise, EnterpriseBlue and Graphite coming directly from the smartgwt-2.x.jar are working fine

                but the skins coming over smartgwt-skins-2.x.jar (BlackOps, fleet, SilverWave, TreeFrog) do have problems with those tool strip buttons

                Originally posted by wwoley
                I saw the same problem while using a ToolStripMenuButton, wheere in every skin except Enterprise and EnterpriseBlue, there was an image appearing under the button title.

                I worked around the appearance issue as follows:

                toolStripMenuButton.setSkinImgDir("../Enterprise/images/");
                ok, it works, but actually looks not very appropriate for some dark skins...

                is there any solution except not using smartgwt-skins-2.x.jar ?

                regards
                andre

                Comment


                  #9
                  Skins other than Enterprise, EnterpriseBlue and Graphite have been deprecated in SmartGWT for a while now an do not support ToolStripButton, HeaderIcon's etc.

                  Sanjiv

                  Comment


                    #10
                    hi Sjivan,

                    thanks a lot for fast reply, the skins however do look very cool!
                    It's a pity that there is no support for them

                    anyway, are there any other skins, which can be used?
                    are there any tutorials, how to develop a new skin?

                    probably the only way is to take the Enterprise skin, and to do some changes on it...

                    cheers
                    andre

                    Comment


                      #11
                      Which skin in particular are you using? You could examine the Enterprise skin to see what media needs to be added for supporting ToolStripButton's, HeaderIcons, pickerIcons and transferIcons. These are the thinks not present in the older skin. If you submit a patch with these changes I'll add them to the skins.

                      Sanjiv

                      Comment


                        #12
                        there is no particular skin i'm using

                        for my application i just implemented a combo box to switch between skins(like in showcase). I added all avalable skins to play around...

                        doing that, i noticed, that some icons for some skins are missing
                        i'm afraid, i'm not able to fix the skins, there are no skills for that :-)

                        cheers
                        andre

                        Comment


                          #13
                          I know I am digging the grave with this topic but is the missing icon issue for ToolStripMenuButton.setIcon a bug or is it a feature? The Canvas.imgHTML(imgPath); workaround is not the best solution since the title does not align with the icons as can be seen in this image for the Filter menu button:
                          Click image for larger version

Name:	Screenshot 2021-09-10 at 16.15.01.png
Views:	136
Size:	3.0 KB
ID:	266431

                          Comment


                            #14
                            You could wrap your (icon + titleText) in a <span style='vertical-align:middle;'>

                            Comment


                              #15
                              Thank you for the hint. It worked like this (the style='vertical-align:middle;' must be put on the <img> tag):

                              Code:
                              String imgHTML = Canvas.getImgURL("Filter.png");
                              filterMenuToolBtn = new ToolStripMenuButton();
                              filterMenuToolBtn.setTitle("<span><img src='" + imgHTML + "' style='vertical-align:middle;'>Filter</span>");

                              Comment

                              Working...
                              X