Announcement

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

    Problem in Setting Icon of SectionHeader

    Hi All,

    when try to get section Header from SectionStatckSection after creating sectionStackSection to use setIcon to override its defualt icon , i found its reference is null and when trying to get sectionHeader after applying sectionStacksection to a sectionStack and trying to setIcon , i got an error , its meaning that i can't change the icon after the component is rendered .

    so please help me , what i need is to change the default icon of section Stack section in smartgwt

    #2
    Anyone figure this out? I've got the same issue. I can't figure out how to work with a SectionHeader. I can create one, but I can't add it to a SectionStackSection. And the SectionStackSection getSectionHeader() method either returns "null" before rendering, and after rendering I cannot edit the SectionHeader.

    Comment


      #3
      Hi
      I have the same problem. Is any simple way to change icon in SectionHeader of SectionStackSection ?

      Regards

      Martin

      Comment


        #4
        Hello,

        I need to change the Background color for SectionStackSection for a particular module.

        Following is the Description:
        On Click of SectionStackSection, Dark color background should be enabled for the selected component.


        Regards

        Vijay[/QUOTE]

        Comment


          #5
          Does anyone have a solution to this? It seems like a bug, because SectionStackSection.getSectionHeader() does return null even after the section has been added to the stack using SectionStack.addSection(...).

          There is no sample of changing the icon in the Show Case.

          Anyone?

          -Tuomo

          Comment


            #6
            hi

            i have the solution,sorry no code sample,pls try it on

            SectionHeader header = new SectionHeader();
            header.setIcon(imagePath);
            SectionStackSection sectionStackSection = new SectionStackSection();
            sectionStackSection.setSectionHeader(header);

            do as .. it will work

            Comment


              #7
              vinuriyer, thank you for a fast reply. However, I'm afraid your solution doesn't work because the SmartGWT API has no method called SectionStackSection.setSectionHeader(...). I wish it did...

              Any other ideas?

              -Tuomo

              Comment


                #8
                hi ,am sorry 4 the wrong answer

                Pls do this
                <CODE>

                SectionStack sectionStack = new SectionStack();

                String imagePath = "test.png";
                String title = Canvas.imgHTML(imagePath) + "My title";
                SectionStackSection section = new SectionStackSection(title);
                sectionStack.addSection(section);
                </CODE>

                Leave the sectionheader,do this ..
                purpose is imp ,not the way
                Last edited by vinuriyer; 30 Mar 2011, 03:55.

                Comment


                  #9
                  vinuriyer, thank you, that worked. I was working with tabs earlier, and had a similar icon issue there. This post solved that problem: http://forums.smartclient.com/showthread.php?t=11211

                  BR,
                  Tuomo

                  Comment


                    #10
                    ohh for tab also ,this problem ...

                    ok bye

                    Comment


                      #11
                      Hi all,
                      Of course this is a very old thread. but there is a simple solution to this situation, that may help future newbe's

                      One single Statement
                      Code:
                      sectionStackSection1.setAttribute("icon", "icon/16/folder.png");
                      Now, you may need four images in the icon/16/ directory,
                      folder_opened.png
                      folder_closed.png
                      Disabled_folder_opened.png
                      Disabled_folder_closed.png

                      Hope this helps.

                      Comment

                      Working...
                      X