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

Find out how many pages/sheets a tabbed object has?

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

    Find out how many pages/sheets a tabbed object has?

    Can anyone help with a method to find out how many pages/sheets there are in a tabbed object using xbasic or Action script.

    I tried the object.child_enum() function hoping it would include a list of sheets as child objects but it doesn't.

    Any help or pointers greatly appreciated.

    #2
    Re: Find out how many pages/sheets a tabbed object has?

    Not sure I understand the question.
    You put a tabbed object on a form.
    You want to find out, via xbasic, how many pages in the tabbed object, right?

    There is a way you could do that with xbasic, but don't you already know that answer?

    Comment


      #3
      Re: Find out how many pages/sheets a tabbed object has?

      Trying to do some global editing to several forms. In fact if I get it working it would be a general purpose tool that I can use when developing DB's.

      How would you advise doing it with xbasic?

      Comment


        #4
        Re: Find out how many pages/sheets a tabbed object has?

        [ATTACH]17995[/ATTACH]

        Comment


          #5
          Re: Find out how many pages/sheets a tabbed object has?

          G - Thanks for the confirmation it can be done. For a minute I thought you were going to show the onpush event for the button.

          Cheers

          Geoff

          Comment


            #6
            Re: Find out how many pages/sheets a tabbed object has?

            Originally posted by gmeredith17 View Post
            G - Thanks for the confirmation it can be done. For a minute I thought you were going to show the onpush event for the button.

            Cheers

            Geoff
            Simple as it is, it won't take you any time to figure it out.

            Comment


              #7
              Re: Find out how many pages/sheets a tabbed object has?

              Hi Geoff,

              Here's a solution on my web site that does work. Click Here

              However, while various general functions I make need to know how many tabs there are, the question is, what are you doing that needs this?
              Regards,

              Ira J. Perlow
              Computer Systems Design


              CSDA A5 Products
              New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
              CSDA Barcode Functions

              CSDA Code Utility
              CSDA Screen Capture


              Comment


                #8
                Re: Find out how many pages/sheets a tabbed object has?

                G - Thanks for the encouragement although your faith in me may be a little misplaced. However I have come up with a solution to my problem which a simplified version can be seen in the attached file. What software do you use to create your avi files?

                Ira - Thanks for the link. I haven't looked at your function yet but will have a look later today.



                I have attached a avi file showing the concept for anyone that might be interested.

                Comment


                  #9
                  Re: Find out how many pages/sheets a tabbed object has?

                  Geoff,
                  At least on my pc the resolution is such that I could not read any of your OnPush event script. Maybe posting it here within code blocks (the # icon at top right in an advanced reply) would be better.
                  Mike
                  __________________________________________
                  It is only when we forget all our learning that we begin to know.
                  It's not what you look at that matters, it's what you see.
                  Henry David Thoreau
                  __________________________________________



                  Comment


                    #10
                    Re: Find out how many pages/sheets a tabbed object has?

                    Mike,

                    I did wonder if that would be a problem. I am using a 24" monitor with a resoltion of 1920x1200.

                    Button code is
                    Code:
                    dim objlist as c
                    dim shtext as c
                    dim shnum as n
                    dim tabobj_list as c
                    
                    shnum=1
                    
                    tabobj_list=tabbed1.child_enum("p")
                    for each objprop in tabobj_list
                    		    	
                    	shtext="tabbed1.tabs.sheet"+"["+shnum+"]"+".text"
                    	if objprop=shtext then
                    		shnum=shnum+1
                    	end if
                    next
                    shnum=shnum-1
                    message="There are "+shnum+" pages"
                    		   	
                    ui_msg_box("Tab pages", message)

                    Comment


                      #11
                      Re: Find out how many pages/sheets a tabbed object has?

                      Not bad Geoff.

                      So, somebody please help me out here:

                      1-You place a question on the board. Evidently, you tried and tried and couldn't come up with an answer
                      2-Here comes mean-spirited Gabriel with a video showing it can be done.
                      3-Next thing you know, you come up with your own answer !

                      What is the psychology behind this?

                      Comment


                        #12
                        Re: Find out how many pages/sheets a tabbed object has?

                        Not sure about the psychology but it kinda went like this...

                        When I was writing the original question I re-looked up the object.child_enum() in the help file to make sure I wrote it correctly on the message board (haven't got these functions memorised yet). I noticed that I had overlooked the 'p' operator. All my previous experiments had been looking for child objects in the tab rather than properties. You then posted your avi file which gave me some further inspiration that it could be done. Not sure about the mean spirited bit as I am always grateful when someone spends time looking at the problems I have posted.

                        Anyway after a good night sleep and starting fresh in the morning things started to come together (after about an hour, I guess the coffee had started to kick in).

                        Pyscology

                        If I am honest I guess I was hoping there was an inbuilt function that I hadn't found. The fact nobody responded with one gave me the extra push to find my own solution. I hate re-inventing the wheel and I'm always optimistic that someone at Alpha has already created one and all I need is to be pointed in the right direction.

                        I'm still curious about your own solution. Are ready to show the script behind your button?

                        Comment


                          #13
                          Re: Find out how many pages/sheets a tabbed object has?

                          G.
                          What is the psychology behind this?
                          You obviously have your own ideas of this....I think it is more that without help, Geoff simply kept plugging away at it. How your showing that a solution was possible is helpful is something I will not even try to explain how it isn't to someone who thinks it is..... considering that almost anything is doable with Alpha.

                          To me, if a person asks a specific question that is not "Is it possible?", then a response such as "yes it is" or a video basically stating the same, is no answer at all...and is the reason I think most who have been here a while don't even bother opening your videos anymore.


                          Just glad Geoff found a solution.
                          Enough venting by me for a while I guess!!! :)
                          Mike
                          __________________________________________
                          It is only when we forget all our learning that we begin to know.
                          It's not what you look at that matters, it's what you see.
                          Henry David Thoreau
                          __________________________________________



                          Comment


                            #14
                            Re: Find out how many pages/sheets a tabbed object has?

                            Originally posted by gmeredith17 View Post
                            I'm still curious about your own solution. Are ready to show the script behind your button?
                            I would, but it seems to be counter-productive. Wouldn't curtail the creative spirits?
                            But, if you insist, here it is:
                            Code:
                            dim x as n=1
                            dim x1 as n
                            tabbed1.tab_set(1)
                            while x<>x1
                            	x1=tabbed1.tab_get()
                            tabbed1.tab_set(x1+1)
                            x=tabbed1.tab_get()
                            end while
                            tabbed1.tab_set(1)
                            msgbox("This tabbed Object has "+x+" pages")
                            It's rather dumb and primitive, but works.

                            Comment


                              #15
                              Re: Find out how many pages/sheets a tabbed object has?

                              Originally posted by MikeC View Post
                              G.

                              You obviously have your own ideas of this....I think it is more that without help, Geoff simply kept plugging away at it. How your showing that a solution was possible is helpful is something I will not even try to explain how it isn't to someone who thinks it is..... considering that almost anything is doable with Alpha.

                              To me, if a person asks a specific question that is not "Is it possible?", then a response such as "yes it is" or a video basically stating the same, is no answer at all...and is the reason I think most who have been here a while don't even bother opening your videos anymore.


                              Just glad Geoff found a solution.
                              Enough venting by me for a while I guess!!! :)

                              I wouldn't even begin to try to figure out the psychology behind this ramble! And I know for a fact that you do open my videos, unless your telepathy is over-active.

                              Comment

                              Working...
                              X