Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 5 of 5

Thread: Multi-combobox?

  1. #1
    Join Date
    Oct 2008
    Posts
    2

    Grin Multi-combobox?

    I have used autoplay media studio, but not for anything complicated. now I have a need to create a disk for a teacher for state standards. he has all the state standards in a PDF format, but needs to select the state, the subject, then the grade. so I need to be able to select ohio in one combobox (from the list of 50 states), than pick math (from a list of 2 subjects), then 3rd grade (from a list of 7 grades) then the Ohio 3rd grade math standard PDF will start.

    I'm pretty sure I can get this to work on different pages, but is there a way to have this on one page?

    Is there a better way than using comboboxes?

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    On one page, you may have multiple combo boxes.

    if the file names are named in a standard way, like:
    Ohio-3rd grade-Math.pdf

    Then you could be fairly creative and use File.Find() to load up the combo boxes to prevent any typo's.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  3. #3
    Join Date
    Sep 2008
    Posts
    55
    Just make 3 combo boxes with all of your information in the Item Text. In the Item data for the given Item Text put in the naming convention of the pdf file. (ex. Ohio3rdMa.pdf meaning Ohio, 3rd grade, Math.) put in the Item data Ohio for the state OH. Then do the same with Item Text is Math and Item data Ma etc. Then on the last combobox in the script On Select use this:

    Code:
    state = ComboBox.GetSelected("ComboBox1");  -- saves the selected item's data
    grade = ComboBox.GetSelected("ComboBox2");  -- saves the selected item's data
    subject = ComboBox.GetSelected("ComboBox1");  -- saves the selected item's data
    
    result = File.Run("AutoPlay\\Docs\\"..state..""..grade..""subject".pdf", "", "", SW_SHOWNORMAL, false);
    Or something like that.

  4. #4
    Join Date
    Oct 2008
    Posts
    2
    I can get it to work if I use the text in the box,

    state = ComboBox.GetText("ComboBox1");
    grade = ComboBox.GetText("ComboBox2");
    subject = ComboBox.GetText("ComboBox3");
    File.Open("AutoPlay\\Docs\\"..state..""..grade.."" ..subject..".pdf", "", SW_SHOWNORMAL);

    At least I can get it to work

    I'm still working on it, maybe I can get it more the way you suggested. Thanks so much for the help!

  5. #5
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    FWIW, you can shorten it down:

    Code:
    File.Open("AutoPlay\\Docs\\"..state..grade..subject..".pdf", "", SW_SHOWNORMAL);
    if the state is always 2 characters, and the grade is always 2; then you could use File.Find() to fill in the combo boxes easily...

    A slick way to do it would be to use an sqlite database and store all the info -- then fill in the combo boxes based on previous choices...

    so they pick OH -- combo box 2 now gets filled with grades with documents for that state, etc. So the user wouldn't be able to pick a document that doesn't actually exist...


    But that would require the documents to be named in a standard way, or have delimeters that you could parse...


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

Similar Threads

  1. help with combobox select text in combobox
    By lnd in forum AutoPlay Media Studio 7.5
    Replies: 2
    Last Post: 04-01-2008, 06:00 AM
  2. Serious ComboBox Issue
    By Dermot in forum AutoPlay Media Studio 7.5 Suggestions
    Replies: 5
    Last Post: 03-10-2008, 08:42 AM
  3. ComboBox Code ?
    By dragon3781 in forum AutoPlay Media Studio 6.0
    Replies: 6
    Last Post: 09-24-2007, 02:53 AM
  4. ComboBox Reset
    By azmanar in forum AutoPlay Media Studio 6.0
    Replies: 2
    Last Post: 12-29-2005, 12:46 PM
  5. ComboBox display current
    By pjhiggins in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 05-21-2004, 12:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts