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

Text (and/or variable) on toolbar with Xdialog

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

    Text (and/or variable) on toolbar with Xdialog

    A while back Selwyn had a thread about making your own status bar with the toolbar genie.

    I want to do something similar but not knowing xdialog can't figure out how to do it. Thought it might be simple for you Xdialog guys. My database deals with people and I wanted a toolbar at the top that had the person's ID and name.

    0000000001 - Tom Mills

    If I tell the genie:

    {text=1000,2:vcID}

    I get a bar the proper length and height and can plug in a variable of the person's ID. But I can't figure out how to get 2 variables (name in other variable) or the "-" as text.

    Ideally I'd like the font size to be big enough to take up both lines of the toolbar. (Can you do that?)

    Any ideas?

    #2
    RE: Text (and/or variable) on toolbar with Xdialog

    Don't display vcID, build a single varible that has what you want to display:

    vcID = "0000000001"
    vcName = "Tom Mills"
    vcToolbarText = vcID + " - " + vcName

    ui_dlg_box("",

    -Lenny

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

    Comment


      #3
      RE: Text (and/or variable) on toolbar with Xdialog

      Okay, I don't think I can do what I really wanted unless someone knows a trick.

      What I wanted was a form with my own toolbar at the top (which I have) assigned by the form properties.

      Then underneath that (docked essentially) another toolbar that simply displays the Name and ID in fairly large text.

      I can get that toolbar also by itself. (Using the toolbar genie it just needed:

      {font=ComicSans MS,15}{text=1000,2:vcBarTxt}

      The problem is I can't find away to implement that second toolbar. Is there a way to start a second toolbar after the one assigned by the form properties?

      Comment


        #4
        RE: Text (and/or variable) on toolbar with Xdialog

        Tom

        What you want is actually fairly easy. You can have more than one toolbar open at a time. If you open 2, the become stacked, which sound like what you want.

        I assume the text for the toolbar will be supplied froma variable. You first need to create the variable and probably set its scope to global and give it a value. Next, create a new blank toolbar. On the toolbar add a free-form xdialog. Click the design xdialog button and place the code you have in the xdialog body. Now preview the toolbar. Is that what you need?

        Jerry

        Comment


          #5
          RE: Text (and/or variable) on toolbar with Xdialog

          I have created both tool bars successfully. The first one (with real buttons) I open with the form as part of the form properties.

          My problem is how do I open the second (already created) toolbar? Form properties only allows you one tool bar, and I see nothing in Action Scripting to allow me to open a toolbar upon form init.

          I suspect there is some xbasic code. I'll look there as soon as I get a chance.

          (But I have to get up in 5 hours to attend 2 days of Spring Training!!)

          Comment


            #6
            RE: Text (and/or variable) on toolbar with Xdialog

            Tom

            This xbasic will open a named toolbar

            a5_toolbar_open("ToolbarName")

            and this will close a named toolbar

            a5_close_system_toolbars("ToolbarName")

            This code can be run from a form event, a button, a script, wherever.

            Jerry

            Comment


              #7
              RE: Text (and/or variable) on toolbar with Xdialog

              I used Jack's xbasic to open both my toolbars instead of using the form properties.

              In a perfect world the form looks like this: The system menu on top, the toolbar with buttons next, and then the toolbar displaying the ID and Name variable. (which is showing for text purposes on the form in the middle-right)

              Comment


                #8
                RE: Text (and/or variable) on toolbar with Xdialog

                But what happens is that except for the fact that the button toolbar always opens before the yellow toolbar (corresponding to the way I opened them in xbasic), the toolbars and menus seem to place themselves randomly when I open the form.

                In this shot the system menu is now lowest, and the variable no longer shows up on the toolbar. You can see it momentarily before it repositions into this spot, and it still shows up on the main form.

                Comment


                  #9
                  RE: Text (and/or variable) on toolbar with Xdialog

                  Oops. Guess that was Jerry not Jack. In this shot the system menu decided to "go right".

                  Comment


                    #10
                    RE: Text (and/or variable) on toolbar with Xdialog

                    Now, when I tell the toolbar to go to the bottom (where I don't want it!!) everything stays in it's place everytime.

                    Comment


                      #11
                      RE: Text (and/or variable) on toolbar with Xdialog

                      Tom

                      I would put the main toolbar in form properties so it will load first. On the other toolbar, check if its properties in design is set to allow docking only on top. That might help.

                      Jerry

                      Comment


                        #12
                        RE: Text (and/or variable) on toolbar with Xdialog

                        Jerry I did have it docked to the top, and have tried about everything. Right now, it I have one toolbar starting via form properties, one OnInit.

                        They seem to always stay in the right position that way, but the darn system menu is off to the right instead of at the top.

                        If you (or anyone else) wants a hack at this, I've attached the database. To duplicate the problem, run the form called "Search", click on one of the names and hit "Okay".

                        Comment


                          #13
                          RE: Text (and/or variable) on toolbar with Xdialog

                          Tom

                          Your problem is the result of the sequence in which objects load. The OnInit event runs before the form loads, so the toolbar loaded there is loaded first. Then the one in properties is loaded.

                          The solution is fairly simple. Load the "Selector" toolbar in the form properties. Then move this code to the OnActivate event so it fires after the form loads

                          a5_toolbar_open("ID Info")

                          You may want to unload the toolbar when the form closes, so put this on the OnDeactivate event to close the ID toolbar

                          a5_close_system_toolbars("ID Info")

                          This seems to work reliably

                          Jerry

                          Comment


                            #14
                            RE: Text (and/or variable) on toolbar with Xdialog

                            Outstanding. Thanks for your help. Never really understood the difference between OnInit and OnActivate. Thanks.

                            Comment


                              #15
                              RE: Text (and/or variable) on toolbar with Xdialog

                              In the end this did not work either. Worked on the first form but once I extended it to several forms, it started failing again.

                              I even simplified it by starting the toolbars before I loaded the forms, and took all references to toolbars out of the forms properties/events.

                              But still the toolbars started screwing up. They seem unstable to me when you have more than one.

                              Comment

                              Working...
                              X