ListBox to open files and preview images

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • hsantos2001
    Forum Member
    • Jun 2001
    • 7

    ListBox to open files and preview images

    i am trying to make a ListBox so you can open a file. In the listbox is displayed the Subject of the file, not the name of the file. Also, i try that an image preview of the file is shown in the screen. I know that you put the image and set to invisible.

    My question is that how do i make so you scroll down the ListBox, a previre is shown and only when the button OPEN is click, to open the file. How is it done? Any help would be appreciated
  • yosik
    Indigo Rose Customer
    • Jun 2002
    • 1858

    #2
    Hi,
    Here is a project sample that answers your needs.
    Good luck
    Yossi
    Attached Files

    Comment

    • hsantos2001
      Forum Member
      • Jun 2001
      • 7

      #3
      thanks but there is a problem

      thanks for the file but when i try to preview it, it does not do anything! when i press open. I have version 5.0 professional edition. Any idea?

      Comment

      • longedge
        Indigo Rose Customer
        • Aug 2003
        • 2498

        #4
        Works fine for me - but you do need to select a picture (from the listbox) first until then the variable "Myfilename" isn't set.

        Thanks very much Yosik - this is an action/object I've avoided until now but your example shows how easy and effective it is :yes (another one for my store )

        Comment

        • rhosk
          Indigo Rose Customer
          • Aug 2003
          • 1698

          #5
          Originally posted by hsantos2001
          thanks for the file but when i try to preview it, it does not do anything! when i press open. I have version 5.0 professional edition. Any idea?
          Try right-clicking the file and selecting "Save Target As...", then save it to your hard drive first. Then open it. I seem to have that problem here as well - it won't open apz's directly from this forum. Could be just the way our computers are setup is all.
          Regards,

          -Ron

          Music | Video | Pictures

          Comment

          • longedge
            Indigo Rose Customer
            • Aug 2003
            • 2498

            #6
            Could also be a file association problem - e.g. if you double click a .jpg what happens?

            Comment

            • longedge
              Indigo Rose Customer
              • Aug 2003
              • 2498

              #7
              Oh dear - there I go again - I thought you meant that you had looked at Yosik's example and when you click on the 'Open' button nothing happened. You mean that you can't open the .apz do you ?

              How about making an 'embarrassed' smilie available - just for me

              Comment

              • hsantos2001
                Forum Member
                • Jun 2001
                • 7

                #8
                i can open the file and see it in Autoplay and can preview (no error or warnings) and presents the window when I preview, only that nothing happens if i select or click open. What gives?

                Comment

                • longedge
                  Indigo Rose Customer
                  • Aug 2003
                  • 2498

                  #9
                  In that case - what happens if you simply double click on a .jpg file in say windows explorer?

                  (and are you sure that you have FIRST selected a file click on one of the 3 choices in the list box so that the preview picture changes - then click OPEN)
                  Last edited by longedge; 01-12-2005, 02:34 PM.

                  Comment

                  • hsantos2001
                    Forum Member
                    • Jun 2001
                    • 7

                    #10
                    it opens IrfanView with the file

                    Comment

                    • rhosk
                      Indigo Rose Customer
                      • Aug 2003
                      • 1698

                      #11
                      "So, what IS the problem?", ..he asks courteously.
                      Regards,

                      -Ron

                      Music | Video | Pictures

                      Comment

                      • hsantos2001
                        Forum Member
                        • Jun 2001
                        • 7

                        #12
                        it is no a file association problem - e.g. if you double click a .jpg, it opens Irfanview in the Window Explorer but it does not open or change the image inside when i preview the project

                        Comment

                        • longedge
                          Indigo Rose Customer
                          • Aug 2003
                          • 2498

                          #13
                          OK - when you preview the project, you see a man with a phone and some tall buildings in the background. Click the 'down' arrow on the List Box until it says "Subject2" then click on the word Subject2.

                          When you've done that, the preview changes to a blue hand pointing at you. Now click the 'Open' button.

                          If I do the above in that order, then the blue hand picture opens in IrfanView (also my default viewer, same as yours).

                          Comment

                          • yosik
                            Indigo Rose Customer
                            • Jun 2002
                            • 1858

                            #14
                            I really don't know what the problem is Hsantos. It should work exactly that way.
                            Yossi

                            Comment

                            • hsantos2001
                              Forum Member
                              • Jun 2001
                              • 7

                              #15
                              Sorry for so much trouble. I did click the 'down' arrow on the List Box until it says "Subject#" BUT DID NOT click on the word Subject #. That was my mistake. sorry for the trouble. By the way, great example of listbox. Is there a place to download examples like that by keywords?

                              Comment

                              Working...
                              X