Populating ComboBox Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • octane6228
    Forum Member
    • Feb 2004
    • 47

    Populating ComboBox Plugin

    Hi Guys...I'm trying to populate a combobox based on how many images are in a directory....

    --Populate a table with jpg files from the Image directory and count their numbers
    tbl_path = File.Find("AutoPlay\\Images\\PowerPoint\\", "*.jpg", false, false, nil, nil);
    img_nbr = Table.Count(tbl_path);

    ComboBox.SetUpdate("Plugin2", false);
    for i = 1, img_nbr do
    ComboBox.AddItem ("Plugin2", "Slide "..img_nbr,"");
    end
    ComboBox.SetUpdate("Plugin2", true);



    In this case I have 24 images in the directory...trouble is it just repeats slide 24.....24 times in the combo box....I want it to update the combo box with slide1 to slide24 ?

    Any ideas on what I'm doing wrong?

    Thanks a lot for any help

    Octane
  • Dermot
    Indigo Rose Customer
    • Apr 2004
    • 1791

    #2
    Try this.

    Code:
    ComboBox.SetUpdate("Plugin2", false);
    for i = 1, img_nbr do
    ComboBox.AddItem ("Plugin2", "Slide "..i,"");
    end
    ComboBox.SetUpdate("Plugin2", true);
    Dermot
    Dermot

    I am so out of here :yes

    Comment

    • octane6228
      Forum Member
      • Feb 2004
      • 47

      #3
      Thanks Dermot! It worked great!

      Comment

      Working...
      X