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

Turning Bubble Help for a Form on and off

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

    Turning Bubble Help for a Form on and off

    A user asked for a way to turn bubble help for a form off and on. Here is how you can do it using Xbasic.


    First, define these functions as global UDFs.


    Code:
    function captureBubbleHelp as v (a as p, obj as p)
    dim controls as c 
    controls = obj.child_enum("r;e=this.name() + '|'+this.bubble_help")
    controls = *for_each(x,word(x,1,"|"),controls)
    dim count as n 
    count = line_count(controls)
    a.resize(count)
    a.clear()
    dim i as n 
    for i = 1 to count 
    	a[i].name = word(controls,i,crlf())
    	a[i].bubble_help = obj.child(a[i].name).bubble_help
    next i 
    end function

    Code:
    function turnBubbleHelpOff as v (a as p, obj as p )
    
    dim count as n 
    count = a.first_empty("name")-1
    dim i as n
    dim c as p  
    for i = 1 to count 
    	c = obj.child(a[i].name)
    	c.bubble_help = ""
    next i 
    
    
    end function

    Code:
    function turnBubbleHelpOn as v (a as p, obj as p )
    
    dim count as n 
    count = a.first_empty("name")-1
    dim i as n
    dim c as p  
    for i = 1 to count 
    	c = obj.child(a[i].name)
    	c.bubble_help = a[i].bubble_help
    next i 
    
    
    end function


    Then, in the form's Init event put this code:


    Code:
    delete shared a
    dim shared a[0] as p 
    captureBubbleHelp(a,topparent.this)
    This code will create a shared variable that is an array that stores all of the objects that have bubble help and the current value of the bubble help text.

    Then, define a button to turn bubble help off:


    Code:
    turnBubbleHelpOff(a,topparent.this)

    And define this as the button to turn bubble help on again:

    Code:
    turnBubbleHelpOn(a,topparent.this)

    #2
    Re: Turning Bubble Help for a Form on and off

    Thanks Selwyn,

    This code will be a big help.

    Mark
    Mark Campidonica

    Comment


      #3
      Re: Turning Bubble Help for a Form on and off

      Hi Selwyn,
      will this work with v8? also what do we name the 3 codes/functions?
      you say define these functions as global UDFs... how?

      Thanks. Im new to this. Sorry!
      Last edited by AaronBBrown; 05-09-2007, 02:17 PM.

      Comment


        #4
        Re: Turning Bubble Help for a Form on and off

        Originally posted by TheseNutts View Post
        Hi Selwyn,
        will this work with v8? also what do we name the 3 codes/functions?
        you say define these functions as global UDFs... how?

        Thanks. Im new to this. Sorry!
        1. Yes, it will work in V8.

        2. To define a UDF (User Defined Function), you go to the Code tab of the Control Panel. Right click on the white background and select New, Function. In your case a Genie will probably come up asking for the function name and argument (it is possible to turn off this genie, so it might not come up).

        To define the first function, you would enter the function name and arguments in the genie and then press OK. A5 will open the code editor and fill in a function header for you based on what you entered into the genie.

        I suggest that you delete everything that a5 puts into the code editor and just past the first function in and save it.

        Then repeat for the second function.

        (Personally, I find the new function genie annoying, and I always turn it off so that when I create a new function, I go directly to the code editor.)

        Comment


          #5
          Re: Turning Bubble Help for a Form on and off

          Selwyn,

          Do you know if these functions work in prior versions of Alpha as well? It looks like because of the For Each() function, version 6 may be the earliest for it to work.
          Is there a way to emulate the For Each() function in A5V5 ?
          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


            #6
            Re: Turning Bubble Help for a Form on and off

            Originally posted by MikeC View Post
            Selwyn,

            Do you know if these functions work in prior versions of Alpha as well? It looks like because of the For Each() function, version 6 may be the earliest for it to work.
            Is there a way to emulate the For Each() function in A5V5 ?
            I don't recall in which version *for_each() was introduced, but certainly V5 has the ability to write a loop, and that's just what *for_each() is doing.

            If you understand what the code is doing, it would be possible to make a version of the code that will run in V5.

            Comment


              #7
              Re: Turning Bubble Help for a Form on and off

              Selwyn,

              Thanks for the quick response!

              My mistake--*for_each() can be used in version 5 but not before. It was the For Each ... Next that was introduced in version 6. So it should work in all versions from A5V5 and above--versions prior to this would have to create the loop you referred to that the *for_each() creates.
              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


                #8
                Re: Turning Bubble Help for a Form on and off

                I am wondering how this might be adapted to work from a menu or a toolbar so it could be more global in scope - like in the form editor?
                Robin

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

                Comment


                  #9
                  Re: Turning Bubble Help for a Form on and off

                  Thank you...works like a charm ..in v8

                  Comment


                    #10
                    Re: Turning Bubble Help for a Form on and off

                    I guess i spoke too quick! now getting this error messsage when i open my form.

                    command: a[i].bubble_help = obj.child(a[i].name).bubble_help
                    Object is not defined.

                    Any suggestions?

                    Comment


                      #11
                      Re: Turning Bubble Help for a Form on and off

                      I guess i spoke too quick! now getting this error messsage when i open my form.

                      command: a[i].bubble_help = obj.child(a[i].name).bubble_help
                      Object is not defined.

                      Any suggestions?

                      Comment


                        #12
                        Re: Turning Bubble Help for a Form on and off

                        I bumped this thread because I would like to use Selwyn's functions in my right click menu for my forms. It seems like it ought to work as well there as in the OnActivate or OnInit event for the form. But it doesn't - or at least not for me. Would anyone else like to try it and let me know what they may have discovered in how to use them in that context?
                        Robin

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

                        Comment


                          #13
                          Re: Turning Bubble Help for a Form on and off

                          Originally posted by MoGrace View Post
                          I bumped this thread because I would like to use Selwyn's functions in my right click menu for my forms. It seems like it ought to work as well there as in the OnActivate or OnInit event for the form. But it doesn't - or at least not for me. Would anyone else like to try it and let me know what they may have discovered in how to use them in that context?

                          it still works, with one change.
                          the script that captures the bubble help needs to take into account that html bubble help can have crlf characters in it.

                          so one small change is made to the onInit script that captures the bubble help.

                          if you look at the form in the attached database, there is bubble help on firstname, lastname and company.

                          here is the modified version of the script that captures the initial bubble help


                          Code:
                          function captureBubbleHelp as v (a as p, obj as p)
                          dim controls as c 
                          'need to take into account that bubble help can not include crlf. so this turns crlf into spaces.
                          controls = obj.child_enum("r;e=this.name() + '|' + stritran(this.bubble_help,crlf(),' ')")
                          controls = *for_each(x,word(x,1,"|"),controls)
                          dim count as n 
                          count = line_count(controls)
                          a.resize(count)
                          a.clear()
                          dim i as n 
                          for i = 1 to count 
                          	a[i].name = word(controls,i,crlf())
                          	a[i].bubble_help = obj.child(a[i].name).bubble_help
                          next i 
                          end function

                          Comment


                            #14
                            Re: Turning Bubble Help for a Form on and off

                            Thanks Selwyn,
                            Will this work in the context of a right click menu? I am trying to make it more global in scope so that I don't have to put it in each of my forms OnInit event.
                            Robin

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

                            Comment


                              #15
                              Re: Turning Bubble Help for a Form on and off

                              Originally posted by MoGrace View Post
                              Thanks Selwyn,
                              Will this work in the context of a right click menu? I am trying to make it more global in scope so that I don't have to put it in each of my forms OnInit event.
                              instead of using the onInit event to capture the existing bubble help into an array, you could eliminate the onInit event and then put the code that captures the existing bubble help in the function that turns off the bubble help.

                              this means that every time you turn bubble help off, you first capture the existing bubble help to an array.

                              Comment

                              Working...
                              X