Announcement

Collapse
No announcement yet.

List Box

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • List Box

    ok , I've got about 5 different list boxes, they each have hide/show with the "page.show object".
    How would I go about re-using the same Listbox over, since it's set to show in the same position everytime. Just need a way to repopulate the list and load it from??
    example if any

  • #2
    Re: List Box

    What is wrong with using the show hide functions. It might be easier then working with the removal of files and repopulation of the List Box. If you wanted to reuse the listbox, you could remove the files after you launch what ever it is you are launching from the list box. You would have to make sure that it would repopulate the list box from the appropriate location.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

    Comment


    • #3
      Re: List Box

      Reusing the same Listbox is what I would do, but then I'm a re-use freak, I alway stry to compact things to the lowest amount of components necessary and then run things dynamically. So I'd say you are on the right track.

      As for the "how" I'd need more details but personally I would probably use a global list to store my values and then use a variable %counter% to step through them in chunks of 5 or whatever. (however many you wish to appear at once in the listbox)

      That would be easy and quick to do yet reliable with fast peformance...

      Corey Milner
      Creative Director, Indigo Rose Software

      Comment


      • #4
        Re: List Box

        I agree with reusing items as much as possible. If I start building new, I would reuse as much as possible.

        Corey - do you have an example of what you mention above. I have an idea what you are doing but would like to see it in action. I am most interested in the %counter% option.

        Tigg
        TJ-Tigger
        "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
        "Draco dormiens nunquam titillandus."
        Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

        Comment


        • #5
          Re: List Box

          Sure, here you go:

          http://www.indigorose.com/temp_web/dynamic_globals.zip

          Easy stuff, you'll nail it in mere seconds once you see it... BTW Tigg don't transfix on the variable name, it's irrelevant, the concept is the thing. I used %counter% only because I though it might make the key concept more self apparent...

          NOTE - There's probably a much better way to do this too, or even several. This is just my take on it... Never assume my way is the best way, experiment, experiment, experiment...

          Corey Milner
          Creative Director, Indigo Rose Software

          Comment


          • #6
            Re: List Box

            This would be fine, except now how would you replace the items with set categories? Your picking items off the Global list, Then I would need several global lists, one for each category, but they would still need to use the same Listbox(I think I'm answering my own question here)
            Now what if you want a certain order in the List box, other than the "sort at runtime" you would get them from the global list in any order?
            Ok, I'm not really sure how this global list thing works, I've used it before, and it does the job, but where is it? How would you know whats on it at any time?
            Seems you gottakeep track off all the stuffs added to it throughout the project?

            Comment


            • #7
              Re: List Box

              Fool around with global lists a bit, all will become apparent... They are basically containers, you can fill them with anything you want. You do not need to "keep track" per se as there is an action to search them, although much like arrays, I always try to be aware of what I'm doing...

              Like I say it's really easy stuff, check it out. It'll take you less than an hour to become intimately familiar with Global Lists and their corresponding actions, they're just containers after all...

              As for the categories you can do that with one list or many, up to you. Either will work. once you get in there and learn global lists you will see what I mean.

              As to access you can add/remove global lists to/from your project by going to PROJECT > GLOBAL LISTS. There's tons of excellent tips and facts about global lists, their usage, and the usage of their corresponding actions in the help files, check it out. [img]/ubbthreads/images/icons/tongue.gif[/img]

              Corey Milner
              Creative Director, Indigo Rose Software

              Comment


              • #8
                Re: List Box

                Just a quick tip/comment on list boxes: always remember that you can add multiple items at once, by "stringing them along" with a delimiter. Example:

                item a;item b; item c; item d

                If you know what items you want in the various lists in advance, it's a piece of cake to fill a whole list at once. Just put all the list items in a delimited string like the one above, and add that string to an empty list box.

                You can do this if you use *global lists, too. Just put the items you want into a global list, and then use a Global List - Get Item action and set it to get "All items." That'll give you a delimited string, stored inside a variable...just add the variable to an empty list box, and voila! Instant global list -> list box conversion.

                (*A nice thing about global lists is that they're easy to work with at design time.)

                P.S. - to clear out a list box, use a List Box - Remove action and set it to remove "All items."
                --[[ Indigo Rose Software Developer ]]

                Comment

                Working...
                X