7 Replies Latest reply on Aug 18, 2011 10:54 AM by philmodjunk

    Click on picture for Fullscreen ??

    lifestyledesign

      Title

      Click on picture for Fullscreen ??

      Post

      Hi everyone,

       

      Hope you guys had a great week end.

       

      I was wondering if any of you knew what to do in order to click on a field picture to see it fullscreen ?

      See attached the gallery I have so far but I need the option to see the images in fullscreen.

      Please let me know if you have any idea.

      Thanks,

      Screen_shot_2011-08-15_at_11.38.26_AM.png

        • 1. Re: Click on picture for Fullscreen ??
          philmodjunk

          You can create a layout where a Container field is sized to fill the entire window. Then you can use button set up to turn the container field in the above layout into button that runs a script that uses New Window to open a window with this layout. Details on how to bring up the necessary picture in the container field in this new window will depend on the structure of your database.

          • 2. Re: Click on picture for Fullscreen ??
            lifestyledesign

            Thank you for the answer.

            I think I understand.  I've then a couple questions :

            - How do I script the button in question i.e. when I click on it, it opens a new window wit the correct image ?

            Regarding my database, I only have one Table which contains everything.  So each image has it's own Field named like pictuire 1, picture 2 etc.

            - How can the window scale automatically when I am on different screen size ?

            Thank you

            • 3. Re: Click on picture for Fullscreen ??
              philmodjunk

              Regarding my database, I only have one Table which contains everything.  So each image has it's own Field named like pictuire 1, picture 2 etc.

              While it takes a bit more work to set up with the layotu format you show in your screen shot, a table of related pictures would make this easier and simpler to set up and is generally a more flexible database design as you will no longer be limited to 6 images per record.

              Given your current design, you can define a 7th container field, EnlargedImage, to put on the new layout based on this same table. Put this new field in the body of the layout and remove the header and footer layout parts. (Use part setup... or click on the part labels, then press delete.) Put this container field into the upper left corner as far to the top/left that it will go. Give it the same dimensions as the container fields on the above layout.

              In the inspector, click on the anchors in the autosizing section so that the field is locked to the top, left, right and bottom edges of your layout. On the data tab, select enlarge/reduce graphic and specify maintain proportions so that the image scaling doesn't distort your pictures.

              Now your script can be something like this:

              Set Field [Yourtable::EnlargedImage ; getField ( Scriptparameter ) ]
              New Window [//specify parameters for window name, size and location here. Get ( ScreenWidth ) and Get ( ScreenHeight ) can specify the current user's screen size so that the new window fills the monitor screen.]
              Go To layout [//select new layout we just created here ]

              On your existing layout, enter layout mode and select the first container field. Select button setup... and select the perform script option to perform the script that you just created. In the optional script parameter box, enter this expression, using your table and field names in place of mine: GetFieldName ( YourTable::FirstcontainerFieldName )

              For each of the other 5 container fields, do the same but update the expression in the parameter box to refer to a different container field.

              • 4. Re: Click on picture for Fullscreen ??
                lifestyledesign

                I followed your instructions and I am now able to click on the miniature and open a new window, but the image does not appear ...  Would you have any idea why ?

                Thank you,

                 

                Here is the script "Fulsscrenn picture"

                Set Field [Inventory::Fullscreen container[GetField ( Inventory::Picture)]]

                New Window [Name: "Fullscreen";Height: Get ( ScreenWidth); Width: Get (ScreenHeight); Top: 0;Left: 0]

                Go to Layout ["Fullscreen" (Inventory)]

                 

                 

                • 5. Re: Click on picture for Fullscreen ??
                  philmodjunk

                  Set field is not set up correctly. Notice the extra brackets that are not present in my example script.

                  When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

                  • 6. Re: Click on picture for Fullscreen ??
                    lifestyledesign

                    Hi,

                    despite I fixed the scrip, it still doesn't seem to work.  The new window opens but only appears an interrogation mark: ?

                    Any idea ?

                     

                    Here is the new script:

                    Set Field [Inventory::Fullscreen container; GetField ( Inventory::Picture)]

                    New Window [Name: "Fullscreen";Height: Get ( ScreenWidth); Width: Get (ScreenHeight); Top: 0;Left: 0]

                    Go to Layout ["Fullscreen" (Inventory)]

                     

                    • 7. Re: Click on picture for Fullscreen ??
                      philmodjunk

                      Set Field [Inventory::Fullscreen container; Inventory::Picture]

                      New Window [Name: "Fullscreen";Height: Get ( ScreenWidth); Width: Get (ScreenHeight); Top: 0;Left: 0]

                      Go to Layout ["Fullscreen" (Inventory)]

                       

                      GetField is a special function. GetField ( Table::Field ) returns the value of the field whose name is stored in table::Field. If Table::field stores "address", then get field returns the contents of a field named "address".