Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

View and Select Multiple Images on Form or Browse

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

    #16
    Re: View and Select Multiple Images on Form or Browse

    Also,

    I can not figure out for the life of me, when I click the button how to go to another form and view more information about that field.

    I am very close but just need this to finish.

    Comment


      #17
      Re: View and Select Multiple Images on Form or Browse

      Too bad there is no previous button code but I will try to work it out and post the finished version when i am all done for everyone.

      Thank you!!

      Comment


        #18
        Re: View and Select Multiple Images on Form or Browse

        Chad,

        I know that I have offered help and didn't post anything else ( I hate when somebody is doing that!) ... but Im moving out and really don't have time for nothing else.

        Just to give you some more ideas:
        - problem with best fit on buttons - that might be hard to resolve. Ill keep the photos into the bitmap fields (solution for best fit) and additional button for every bitmap placeholder for the 'extra info' + some simple code will be required.
        - with the prev button - simple the same idea what next button is, with the difference off course that you don't add but subtract and make sure that the number that sets the first photo to be shown will no go below 1. (if you want to add the loop effect as it is done with the next button set the number to the last when it goes below 1).
        - to show extra info - create another form that will show info about the employee, then every extra 'info button' will have to open that form with proper filter to show info about selected employee. check documentation for the 'form.ViewQueried' function.

        Good luck.

        Comment


          #19
          Re: View and Select Multiple Images on Form or Browse

          Hello,

          Here is my code to display 15 images from my table of potentially hundreds of images.

          My problem in this code is that I don't think it is assigning each button a reference because I would like to click on the button and then go to another form and edit or view information on only that record.

          It seems that the photos are all different in the buttons but the record remains the same.

          Could anyone help me with this?


          I have included my code and what the setup of the buttons are. When I initially load this the buttons have images on them and it will cycle through as many as I need but I have no way to get to the specific record of the individual picture.

          Thank you,

          Chad

          Here is my code:




          'Date Created: 27-May-2009 08:48:55 PM
          'Last Updated: 02-Jun-2009 03:56:07 PM
          'Created By : Chad Johnson
          'Updated By : Administrator
          'topparent:Button2.Default.Hbitmap.Bmpfile
          dim table_photos as P
          table_photos = table.open("photos")

          'list fo the bitmap placeholders:
          v_placeholders = <<%str%
          B1
          B2
          B3
          B4
          B5
          B6
          B7
          B8
          B9
          B10
          B11
          B12
          B13
          B14
          B15
          %str%
          'number of that placeholders
          v_n_placeholders = line_count(v_placeholders)

          'list of all photos from photo table - if you have more than 100 photos then extend the number here
          dim a_photo_list[600] as C

          dim i as N=0

          'read all photo names from table with photos
          table_photos.order("Lastname",".t.")
          WHILE .not. table_photos.fetch_eof()
          i=i+1
          a_photo_list[i] = table_photos.Image

          table_photos.fetch_next()
          END WHILE

          'i = number of all photos in the table



          'now show the photos in the placeholders
          v_temp_prefix= "parentform:"
          v_temp_sufix = ".bitmap.filename"
          v2_temp_sufix = ".Default.Hbitmap.Bmpfile"

          'Set properties of 'Bitmap1' in Form 'F_photos' .
          FOR j=1 TO v_n_placeholders

          'if there is photo then disply it in proper place

          IF (v_start_from<=i) THEN
          'bitmap object
          'eval(v_temp_prefix+"bitmap"+j+v_temp_sufix)= a_photo_list[v_start_from]
          'eval(v_temp_prefix+"bitmap"+j+".object.visible") = .t.
          'button
          eval(v_temp_prefix+"B"+j+v2_temp_sufix) = a_photo_list[v_start_from]
          eval(v_temp_prefix+"B"+j+".object.visible") = .t.


          ELSE
          'bitmap object
          'eval(v_temp_prefix+"bitmap"+j+".object.visible") = .f.
          'button
          eval(v_temp_prefix+"B"+j+".object.visible") = .f.
          'if not then hide the place holder
          END IF
          F_photosrev3.Repaint()
          'var defined on the form that will remeber from whih foto to start
          v_start_from=v_start_from+1
          next

          'when numbers excided the number of photos then reset it so the first one will be shown
          IF (v_start_from>i) THEN
          v_start_from=1
          END IF
          Last edited by johnsocm; 06-04-2009, 08:41 PM. Reason: Needed to add the picture of my page

          Comment


            #20
            Re: View and Select Multiple Images on Form or Browse

            Also I am using this same code on the "ONinit" as well as the next button to auctomatically load the images initially and then cycle through the images when I press next.

            Now I included the code I am trying to configure for the previous button. I would like to be able to go back one page if I accidently went through too many pages. I really tried hard to manipulate the next button code for this previous button code but it seems to only display a blank page or clear all the buttons on the page.

            Thank you guys so much for helping me out!!!

            Chad

            'Date Created: 27-May-2009 08:48:55 PM
            'Last Updated: 04-Jun-2009 05:15:32 PM
            'Created By : Chad Johnson
            'Updated By : Administrator
            'topparent:Button2.Default.Hbitmap.Bmpfile
            dim table_photos as P
            table_photos = table.open("photos")

            'list fo the bitmap placeholders:
            v_placeholders = <<%str%
            B1
            B2
            B3
            B4
            B5
            B6
            B7
            B8
            B9
            B10
            B11
            B12
            B13
            B14
            B15
            %str%
            'number of that placeholders
            v_n_placeholders = line_count(v_placeholders)

            'list of all photos from photo table - if you have more than 100 photos then extend the number here
            dim a_photo_list[600] as C

            dim i as N=0

            'read all photo names from table with photos
            table_photos.order("Lastname",".t.")
            WHILE .not. table_photos.fetch_eof()
            i=i+1
            a_photo_list[i] = table_photos.Image

            table_photos.fetch_next()
            END WHILE

            'i = number of all photos in the table



            'now show the photos in the placeholders
            v_temp_prefix= "parentform:"
            v_temp_sufix = ".bitmap.filename"
            v2_temp_sufix = ".Default.Hbitmap.Bmpfile"

            'Set properties of 'Bitmap1' in Form 'F_photos' .
            FOR j=1 TO v_n_placeholders

            'if there is photo then disply it in proper place

            IF (v_start_from>=i) THEN
            'bitmap object
            'eval(v_temp_prefix+"bitmap"+j+v_temp_sufix)= a_photo_list[v_start_from]
            'eval(v_temp_prefix+"bitmap"+j+".object.visible") = .t.
            'button
            eval(v_temp_prefix+"B"+j+v2_temp_sufix) = a_photo_list[v_start_from]
            eval(v_temp_prefix+"B"+j+".object.visible") = .t.


            ELSE
            'bitmap object
            'eval(v_temp_prefix+"bitmap"+j+".object.visible") = .f.
            'button
            eval(v_temp_prefix+"B"+j+".object.visible") = .f.
            'if not then hide the place holder
            END IF
            F_photosrev3.Repaint()
            'var defined on the form that will remeber from whih foto to start
            v_start_from=v_start_from-1
            next

            'when numbers excided the number of photos then reset it so the first one will be shown
            IF (v_start_from<i) THEN
            v_start_from=1
            END IF

            Comment


              #21
              Re: View and Select Multiple Images on Form or Browse

              Also Here is my individual button codes as they all open the same record on which ever the first picture is pointing to??



              'Date Created: 28-May-2009 08:18:38 AM
              'Last Updated: 04-Jun-2009 05:54:10 PM
              'Created By : Chad Johnson
              'Updated By : Administrator
              fil = b4.Default.Hbitmap.Bmpfile
              txt = eval(substr(fil,2))
              id = padl(file.filename_parse(txt,"N"),4,"0")
              query.filter = "photo_id ="+quote(id)
              form.ViewQueried("Enter_Students")

              Comment


                #22
                Re: View and Select Multiple Images on Form or Browse

                Hello,
                Attached my first application with some improvements:
                - prev button added
                - under every bitmap there is button that opens form showing info about the employee
                and some changes in the code.

                Once again that has been done really fast and contains (im sure) lots of mistakes or things that could be done better! - some pointers, as always, will be greatly appreciated.

                Hope this will help you.

                Comment


                  #23
                  Re: View and Select Multiple Images on Form or Browse

                  Hello,

                  This code works but some how I might have messed something up. :(

                  I have spent over 30 hours trying to figure out what is wrong with my code. My code is below and it kept asking me for V_Start_From not found. So I put in the f_photo_ctr a V_start_from=1 so it will have a value. Now the next and previous buttons do not work.

                  Is there a way to fix this or am I missing something. It seems the very second I modify the code just a bit with my table called Students instead of photos.

                  I would really appreciate any help on this and sorry I cannot figure it out.

                  All of my buttons and bitmaps are exactly the same as yours.

                  Thank you!!

                  'Date Created: 07-Jun-2009 07:09:52 PM
                  'Last Updated: 16-Jun-2009 03:49:05 PM
                  'Created By : Jarek
                  'Updated By : Administrator
                  FUNCTION f_photo_ctr AS V (v_direction AS C )
                  'function that assigns photos to placeholders and id to buttons

                  dim table_students as P
                  table_students = table.open("students")

                  v_start_from=1
                  'number of placeholders
                  v_n_placeholders = 15

                  'list of all ID (photos or employees) from photo table - if you have more than 100 photos then extend the number here
                  dim a_id_list[100] as C
                  'array that will store info about employee ID corresponding to each button on the form
                  dim shared a_btn_info_id[100] as C

                  dim i as N=0

                  'read all photo names from table with photos
                  table_students.order("Photo_id",".t.")
                  while .not. table_students.fetch_eof()
                  i=i+1
                  a_id_list[i] = table_students.Photo_id

                  table_students.fetch_next()
                  end while


                  'here decide from what number the photos should be shown
                  IF (v_direction = "N") THEN
                  'now go next
                  'when numbers excided the number of photos then reset it so the first one will be shown
                  IF (v_start_from>i) THEN
                  v_start_from=1
                  END IF

                  else if (v_direction="P") then
                  'now we want to see the prev photos - so need to go back 2x number of placeholders, unless the number is lower than 1
                  'then go back from the last photo

                  v_start_from = v_start_from - (2*v_n_placeholders)
                  'now if the number is less than 1 subtract this number from the last photo number e.g 0 - then show the last one, -1 then show the last -1 and so on...
                  IF (v_start_from<i) THEN
                  v_start_from=1
                  END IF


                  'if (v_start_from <1) then
                  ' v_start_from = i + v_start_from
                  'end if
                  END IF


                  'i = number of all photos in the table



                  'now show the photos in the placeholders
                  v_temp_prefix= "parentform:"
                  v_temp_sufix = ".bitmap.filename"


                  'Set properties of 'Bitmap1' in Form 'F_photos' .
                  for j=1 to v_n_placeholders

                  'if there is photo then display it in proper place

                  if (v_start_from<i) then
                  'assign photo to placeholder and make it visible
                  eval(v_temp_prefix+"bitmap"+j+v_temp_sufix)= trim(tablemin("students","photo_id="+s_quote(a_id_list[v_start_from]),"image"))
                  eval(v_temp_prefix+"bitmap"+j+".object.visible") = .t.

                  'assign text on the button to employee name and make it visible
                  eval(v_temp_prefix+"btn_"+j+".text") = trim(tablemin("students","photo_id="+s_quote(a_id_list[v_start_from]),"Firstname"))+" "+trim(tablemin("students","photo_id="+s_quote(a_id_list[v_start_from]),"Lastname"))
                  eval(v_temp_prefix+"btn_"+j+".object.visible")= .t.
                  'assign id to the button
                  a_btn_info_id[j] = a_id_list[v_start_from]

                  else
                  'hide button and placeholder if there is nothing to be shown there
                  eval(v_temp_prefix+"bitmap"+j+".object.visible") = .f.
                  eval(v_temp_prefix+"btn_"+j+".object.visible")= .f.

                  end if

                  'var defined on the form that will remember from which foto to start
                  v_start_from=v_start_from+1
                  next

                  END FUNCTION

                  Comment


                    #24
                    Re: View and Select Multiple Images on Form or Browse

                    Chad,

                    V_Start_From variable is defined as session variable on the form - thanks to that (that it is session and not local) other functions and forms can use it - see the attached screenshot.
                    When the form is opened it is set to 1 and then it is modified by code. If you set it to 1 at the beginning of the function that is supposed to show you the photos it will always start from the first photo - not from the last shown.

                    Sorry for that, I could have done it clearer!

                    Hope this will help you.

                    Comment


                      #25
                      Re: View and Select Multiple Images on Form or Browse

                      All I can say is ONE BIG THANK YOU!!!!! THAT SOLVED ALL MY PROBLEMS!!!

                      Thank you everyone here!!

                      You guys are the greatest and hope I can help out more.

                      Thank you so much as I owe you my life to everyone!!

                      Chad

                      Comment

                      Working...
                      X