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

How to set the width of a browse, and keep it set.

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

    How to set the width of a browse, and keep it set.

    I have designed several custom browses that aren't very wide. When I am in design mode, I set the right side of the browse far enough in to show just the columns I want, with no white space to the right. However, when I run the browse, it usually opens up in full screen width. Sometimes it does, sometimes it opens as I set it. I can find no way to define exactly how wide the browse should be and have it open the same way every time.
    As I recall, a form has an option to set it's opening location to "current location and size", or something like that. I can find no similar feature for the custom browse.

    Any clues?

    #2
    Re: How to set the width of a browse, and keep it set.

    Have you tried to set object values using the Object Explorer?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    Comment


      #3
      Re: How to set the width of a browse, and keep it set.

      Originally posted by Mike Wilson View Post
      Have you tried to set object values using the Object Explorer?
      Thanks, Mike, for your response.

      No, I have not tried setting the width via the object explorer. I shall do that.

      russ rowton

      Comment


        #4
        Re: How to set the width of a browse, and keep it set.

        OK, Mike, I tried (and found) where to set the width via the Object Explorer. So I set it. The current width as displayed was 453. I saved the work, ran the browse, it opened at 1351, way to heck off to the right. I reset it to 453, it immediately closed to the desired width, saved it, reran it, guess what? It opened way off to the right again, about three times wider than what I saved it.

        What good is the property setting if it won't remember or obey it? There must be some other way to get there.

        russ

        Comment


          #5
          Re: How to set the width of a browse, and keep it set.

          Code the oninit event for the browse

          :browse_name.width = 453
          :browse_name.height = desired height

          Substituting the actual browse_name.
          There can be only one.

          Comment


            #6
            Re: How to set the width of a browse, and keep it set.

            Stan's is the easiest way, however embedding a Browse in a Form retains the saved size I believe.
            See our Hybrid Option here;
            https://hybridapps.example-software.com/


            Apologies to anyone I haven't managed to upset yet.
            You are held in a queue and I will get to you soon.

            Comment


              #7
              Re: How to set the width of a browse, and keep it set.

              Originally posted by Stan Mathews View Post
              Code the oninit event for the browse

              :browse_name.width = 453
              :browse_name.height = desired height

              Substituting the actual browse_name.

              Stan, thanks for your time and your response.

              I entered the xbasic as suggested. Exactly. It didn't work.
              I have now discovered (unless I am hallucinating) that a browse opens precisely at the width of the LAST BROWSE OPENED. It doesn't matter what one sets in the properties, or with xbasic, the width of the next browse opened is exactly the width of the last browse opened.
              Can this be true?

              I may have to go with Ted Gile's suggestion and embed the browse in a form... it gives me some extra capabilities, as well.
              I just can't believe what I am seeing with the changes in the browse settings.

              For now, I shall go to the embedded browse. However, I have several long (read 'wide') browses, that open too short, if the last browse opened was a short (narrow) one.

              Thanks, once more, for your time to read and respond. russ r

              Comment


                #8
                Re: How to set the width of a browse, and keep it set.

                Ted, thanks for your help.

                Please see my response to Stan Mathews suggestion.

                Comment


                  #9
                  Re: How to set the width of a browse, and keep it set.

                  Rus, have you thought about splitting the Browse content and using Tabbed Objects?
                  Example;
                  A browse would go over 1� screens.
                  Create Form with two Tabs
                  Browse items 1-10 say. Tab Label = "Demoghaphics"
                  Browse items 11-30 say. Tab Label = "Data/Information"
                  If you want an example, just holler.
                  See our Hybrid Option here;
                  https://hybridapps.example-software.com/


                  Apologies to anyone I haven't managed to upset yet.
                  You are held in a queue and I will get to you soon.

                  Comment


                    #10
                    Re: How to set the width of a browse, and keep it set.

                    Thanks, Ted, for your reply.

                    No, I haven't considered that option. Right now, that would be a little above my pay grade to even think of doing that. But I shall consider it.

                    I really am using this project to learn how to use xbasic. Nearly everything I have ever developed in A5 has always had to have xbasic to get done exactly what I wanted done. "Click and Choose" goes a long, long way as Alpha has matured this software, but I just haven't encountered anything yet that did not call for an xbasic solution.

                    For this project, I probably will go the way you suggested earlier and use an embedded browse on a form. That way I can do several other options using buttons.
                    What I am trying to say is: "this browse thing is not a life or death matter", I was just surprised to discover that it operated in this manner, and that there is seemingly no "click on this" option to solve it. But now I know. I am especially surprised that using Stan's xbasic code did not solve it. I am not convinced that there is not still some overriding condition that prevents the xbasic code from working. If xbasic won't solve it, what will???

                    On to more discoveries.... russ rowton

                    Comment


                      #11
                      Re: How to set the width of a browse, and keep it set.

                      Originally posted by databaser View Post
                      Thanks, Ted, for your reply. No, I haven't considered that option.
                      I am not convinced that there is not still some overriding condition that prevents the xbasic code from working. If xbasic won't solve it, what will???
                      The posts here often reflect the view that standalone browse has really no real place in a system. In my view its a bit like giving a user Excel as a viewer, when you can, as you already noted, very easily produce a controlled result with all the trimmings.

                      Comment


                        #12
                        Re: How to set the width of a browse, and keep it set.

                        The attached took 5 mins. It really could not be simpler.
                        I'm the opposite to you in that I will avoid Xbasic as much as I can.
                        Attached Files
                        See our Hybrid Option here;
                        https://hybridapps.example-software.com/


                        Apologies to anyone I haven't managed to upset yet.
                        You are held in a queue and I will get to you soon.

                        Comment


                          #13
                          Re: How to set the width of a browse, and keep it set.

                          This works for me..

                          oninit event

                          topparent.Height =200
                          topparent.Width =300

                          -unless I maximize another form or browse and then all of the windows are maximized.....
                          Al Buchholz
                          Bookwood Systems, LTD
                          Weekly QReportBuilder Webinars Thursday 1 pm CST

                          Occam's Razor - KISS
                          Normalize till it hurts - De-normalize till it works.
                          Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                          When we triage a problem it is much easier to read sample systems than to read a mind.
                          "Make it as simple as possible, but not simpler."
                          Albert Einstein

                          http://www.iadn.com/images/media/iadn_member.png

                          Comment


                            #14
                            Re: How to set the width of a browse, and keep it set.

                            I couldn't get it to work either. If I opened any browse, resized it and then opened another browse; the size was relevant to the last resizing even from a different browse. Closing them all and opening the one I set the height and width from the control panel went back to the default size despite the OnInit event setting. This seems to be a problem more with a narrow browse than a wider one. Because the wider one without any OnInit size settings, did remember its previous size after closing and reopening.

                            Edit:
                            Calling the browse with a modified genie script did make a difference however:

                            Code:
                            DIM layout_name as c 
                            layout_name = "COA List"
                            DIM tempP as p
                            'Get pointer to existing window. In case layout_name is qualified with a dictionary name, extract up to first @. In case formname has spaces, normalize it
                            tempP=obj(":"+object_Name_normalize(word(layout_name,1,"@")))
                            'Test if pointer is valid
                            if .not. is_object(tempP) then  
                               tempP = :Browse.load(layout_name)   
                               tempP.show() 
                            end if 
                            tempP.width = 500
                            tempP.height = 500
                            tempP.window_position("left","top")
                            tempP.activate()
                            Last edited by MoGrace; 10-29-2011, 03:33 PM.
                            Robin

                            Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                            Comment


                              #15
                              Re: How to set the width of a browse, and keep it set.

                              I modified 2 functions I use to call a browse from a button. Here is the one that fetches the last record by default:

                              Code:
                              FUNCTION vw_brw AS L (brw_name as C,xwidth as N = 850,yheight as N = 640,xpos as c = "Left",ypos as c = "Top" )
                              	DIM brw as P
                              	brw = obj(":"+object_Name_normalize(word(brw_name,1,"@")))
                              	IF .not. is_object(brw) THEN
                              		brw = :browse.load(brw_name)		
                              	END IF
                              	if xwidth > 0 then
                              	    brw.width = xwidth
                              	end if
                              	if yheight > 0 then
                              	    brw.height = yheight
                              	end if
                              	brw.window_position(xpos,ypos)
                              	brw.restrict_enter = .t.	
                              	brw.activate()
                              	brw.fetch_last()
                              END FUNCTION
                              Usage:
                              This uses the default position but sets the width and height
                              vw_brw("COA List",500,500)

                              I have another one that will use "fill","fill" for larger browses so I don't have to maximize them, and it works with my docked global custom toolbar that reduces the fill viewing area.
                              Robin

                              Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

                              Comment

                              Working...
                              X