Announcement

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

    ToolStrip seperators

    When I use toolstrip separators in the following way they work as intended.

    Code:
            this.testButton = isc.IButton.create({
                parent: this,
                align: "right",
                title: "Test",
                autoFit: true,
            });
    
            this.testButton1 = isc.IButton.create({
                parent: this,
                align: "right",
                title: "Test2",
                autoFit: true,
            });
    
            this.testStrip = isc.ToolStrip.create({
                members: [
                    this.testButton,
                    "separator",
                    this.testButton1
                ]
            });
    But when I change to the (I thought) equivalent code below, my separators vanish.

    Code:
            // using the same button defs from above.
    
            this.testStrip = isc.ToolStrip.create({
            });
    
            this.testStrip.addMembers([
                this.testButton,
                "separator",
                this.testButton1
            ]);
    Am I not doing something that I need to?

    Thanks in advance!
    Rob

    #2
    I agree that this is a bit confusing. The ToolStrip class handles the special "separator" token only in its constructor, by creating a resizer, and then passes that to addMembers() which is inherited from the Layout class.

    We'll correct this in a future release. Sorry about the confusion.

    Comment


      #3
      Thanks for your always speedy, concise and accurate replies!
      Rob

      Comment


        #4
        You're welcome :)

        Comment


          #5
          Was this fixed in 6.5? We are still seeing dynamically added separators do not appear in the ToolStrip.

          Comment


            #6
            Sorry, this didn't make 6.5, you still have to create the separate class by hand rather than using the "separator" shortcut.

            Comment


              #7
              This is now fixed for 7.0 final.

              Comment


                #8
                Not sure if this is the exact same but sounds like it.
                Code:
                isc.ToolStripMenuButton.create({
                    ID: "menuButton",
                    title: "File",   
                    menu: menu
                });
                
                isc.ToolStripButton.create({
                    ID: "printButton",    
                    icon: "other/printer.png",  
                    title: "print"
                    
                });
                isc.ToolStrip.create({
                    width: 450, height:24, ID:"myID",
                    members: [ printButton, 
                              "resizer"]
                });
                //myID.addMember(menuButton);
                //myID.addMember("separator");
                myID.addMembers(menuButton, "separator");
                The addMember lines(commented) work. But the addMembers line does not.

                Comment


                  #9
                  This was fixed in 7.0.

                  Comment


                    #10
                    I believe it is broken again.

                    my version:

                    SmartClient Version: SC_SNAPSHOT-2011-06-04/LGPL Deployment (built 2011-06-04)

                    The sample code in my post is from the feature sample and it has the same problem.

                    Comment


                      #11
                      We see the problem: addMembers takes an array, not a series of arguments. Change the code to:

                      Code:
                      myID.addMembers([menuButton, "separator"]);
                      Then it works.

                      Comment


                        #12
                        Many Thanks!

                        Comment

                        Working...
                        X