4 Replies Latest reply on Mar 26, 2008 6:57 PM by Wolfgang Herold

    Drop down lists

    WarDemonZ Level 1
      Hey, im still having trouble with the drop down list behaviour, basically what value does it return when you select something from the list. iv tried reverse engineering the script but iv basically got no where, also is there a way of defining how big the drop down is, it automatically creates a scroll bar if the amount of properties makes the list bigger than the stage, but iv got a drop down that holds like day and year values, which create huge lists.

      i just need to know what values the list returns when u pick something, and how to change the size.

      cheers guys
        • 1. Re: Drop down lists
          Level 7
          Selecting something from the drop down does not generate an event. YOu
          have to 'ask' the sprite which value is currently selected. You do this
          by sending the sprite a message. Suppose for example your drop down is
          in sprite channel 3, and you named the list ColorOptions.

          sending this message

          sendSprite(3, #DropList_Selection, "ColorOptions")

          will tell you which item from the list is currently selected. The return
          data will look something like this:

          [#item: 1, #text: "Blue", #type: #content, #sprite: 3]

          Changing the size of the drop down list is not an available parameter.
          If you want to do this, it will likely require you make some major
          changes to the code.



          WarDemonZ wrote:
          > Hey, im still having trouble with the drop down list behaviour, basically what
          > value does it return when you select something from the list. iv tried reverse
          > engineering the script but iv basically got no where, also is there a way of
          > defining how big the drop down is, it automatically creates a scroll bar if the
          > amount of properties makes the list bigger than the stage, but iv got a drop
          > down that holds like day and year values, which create huge lists.
          >
          > i just need to know what values the list returns when u pick something, and
          > how to change the size.
          >
          > cheers guys
          >
          • 2. Re: Drop down lists
            Level 7
            FYI, the fine folks over at Lingo Workshop have 'simulated' many OS
            controls in their 'One Sprite Widgets' behaviors. One of them is a pop
            up menu which gives you some control over the size of the pop up list.
            It also sends a notification that a selection was made unlike the
            Library behavior you are experimenting with.

            While both of these solutions demonstrate some pretty slick Lingo
            coding, overall these controls pale in comparison to real controls
            offered by the operating system, in my opinion.

            If neither of them suits your needs, then you will either have to 'roll
            your own' which is a lot of work, or purchase one of the 3rd party Xtras
            which give Director the ability to access the real OS controls.

            This is one of Director's shortcomings I have never quite understood
            (perhaps some one in the know might offer some insight). After all
            Macromedia Authorware (a less powerful multimedia development tool) came
            with a free Xtra to do this.
            • 3. Re: Drop down lists
              Wolfgang Herold Level 2
              I also work with some of Luke's one sprite wigets. But for not so experienced users i suggest the cXtraComboBox. It's not free (50 Euro) but simple to handle. If somebody likes, i can post a behaviour and a listener for it.

              Wolfgang
              • 4. Re: Drop down lists
                Wolfgang Herold Level 2
                forgot:
                www.cxtra.net

                worked with a converted project on D11, but did not try with unicode- text yet.

                Wolfgang