Announcement

Collapse
No announcement yet.

Programatically putting text in Radio buttons.

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

  • Programatically putting text in Radio buttons.

    I have a need, where I search for a file & some registry settings, based on that, I then can make a "list" of selections.
    I would like to present this list to users in the form of a radio button or list box... is there a way to programatically enter in values for radio buttons?

  • #2
    Re: Programatically putting text in Radio buttons.

    No, I'm sorry, the radio buttons screen was not meant to be dynamic. For that functionality the List Box is the way to go.

    Comment


    • #3
      Re: Programatically putting text in Radio buttons.

      In a sense you can make the text dynamic. You can use variables in the "Radio Button Text" field for the screen which could be set at runtime, however you cannot have a dynamic list of options.

      Hope that helps.

      Comment


      • #4
        Re: Programatically putting text in Radio buttons.

        Thanks...
        I havea directory
        c:\program files\palm
        under there, there are several directories, and a few have a file "Address.dat"

        c:\program files\palm\josh\address\address.dat
        c:\program files\palm\david\address\address.dat
        etc.
        what I need is to proivde a list of the names to the user (listbox is fine) for them to pick which user to install as.
        My first attempt (still a bit groggy) is below.. But it never yeilds any results, except ;;; in "ListItems"

        Search for File
        Variable = %Dirs%
        Default = NOT FOUND
        Search for file = address.dat
        Search fixed drives = FALSE
        Search remote drives = FALSE
        Search removable drives = FALSE
        Search CD-ROM drives = FALSE
        Search specific directories = TRUE
        Custom directories = %PalmDir%
        Recurse custom dirs = TRUE

        Count Delimited Strings
        Variable = %PathsFound%
        Source = %dirs%
        Delimiter = ;

        Assign Value
        Variable name = %ListItems%
        Value = ;
        Evaluate Value as expression = FALSE
        (On Error) User notification mode = None
        (On Error) Action = Continue

        WHILE
        Condition = %PathsFound% > 0
        (On Error) User notification mode = None
        (On Error) Action = Continue

        Assign Value
        Variable name = %PathsFound%
        Value = %PathsFound% - 1
        Evaluate Value as expression = TRUE
        (On Error) User notification mode = None
        (On Error) Action = Continue

        Get Delimited String
        Variable = %aPath%
        Source = %Paths%
        Delimiter = ;
        Index = %PathsFound%

        Count Delimited Strings
        Variable = %SlashCount%
        Source = %apath%
        Delimiter = \

        Assign Value
        Variable name = %NameIndex%
        Value = %SlashCount% - 2
        Evaluate Value as expression = TRUE
        (On Error) User notification mode = None
        (On Error) Action = Continue

        Get Delimited String
        Variable = %aName%
        Source = %aPath%
        Delimiter = \
        Index = %NameIndex%

        Assign Value
        Variable name = %ListItems%
        Value = %ListItems%;%aName%
        Evaluate Value as expression = FALSE
        (On Error) User notification mode = None
        (On Error) Action = Continue

        END WHILE


        Comment


        • #5
          Re: Programatically putting text in Radio buttons.

          You said: Since you have a string delimited list of paths from your search action, all you need to do is place that variable in the "Additional list box items" field on the CUSTOM tab of the "List Box" screen's properties.

          Doing that will populate the list
          from the delimited string you passed it.

          Hope that helps.

          Except I don't need (or want) the full path to show up; just hte name portion

          c:\program files\palm\Josh\Address\Address.dat
          c:\program files\palm\David\Address\Address.dat

          I need the list box to show
          Josh
          David

          So I need to extract the names from each path to make josh;david

          Ideas?

          Thanks.
          -josh

          btw: I got an email saying go here:
          http://www.indigorose.com/ubbthreads...p;Number=17342
          but that url is dead...

          Comment


          • #6
            Re: Programatically putting text in Radio buttons.

            In the actions you have provided, look at every reference using the variable %ListItems%. Initially you are storing just ";" in that variable and then using it later. I'm not exactly sure what is going on.

            Start off with just one file and see if you can parse it correctly. Then move on to two files. If you can do it with two files you can do it with many. Use the Show Message Box action to display variable contents at certain points in the action script to see what values they hold. Using that debugging procedure you should be able to get it working, however it is much easier to do it incrementally rather than writing a bunch of code and then running it to see if it works.

            Comment

            Working...
            X