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



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

A5 Toolbar - is there a way to remove items from view as opposed to disabling

  • Filter
  • Time
  • Show
Clear All
new posts

  • A5 Toolbar - is there a way to remove items from view as opposed to disabling

    I use a left dock Alpha toolbar for user navigation.
    In my programs there are different methods that various clients employ to do their billing.
    With new clients, adding new options and disabling others, using Alpha's toolbar, is easy enough but raises questions from others, as well as there not being enough space for many disabled items.

    Because accounting and other functions behind are the same future enhancements apply to all customers, I maintain one system.

    I know there are methods to create dynamic menus but none I have tried have the compact width and other features of Alpha's. One being the different shade for options already open.

    Is it possible to get the Xdialog code?
    or anyone know of commands to have items not show?
    OR anyone with another solution to offer or sell?
    Last edited by Ray in Capetown; 10-22-2013, 02:48 AM.

  • #2
    Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

    Can't you copy the a5 toolbar to one of your own name, then customize it to your liking? Your copy would then have the compact look, but would also be customizable.



    • #3
      Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

      Hi Tom
      I create the menus using New Menu from the Program tab in A5 control panel.
      The attached pic is an example.

      I disable menu items dynamically in code according to a table setting for each specific client depending on the type of business.
      These still however show and take up screen real estate.

      Some clients bill rentals, pass on services costs, another may bill on contract schedule and added services, others recover costs by billing .... but not all do every type of billing.

      If I could convert this menu to Xbasic/XML code then I could conditionally, in the code, skip certain options and the user will never see them.

      As mentioned I have tried various dynamic dialog menus and toolbars but they dont have all the functionality, like here items that have windows open remain highlighted (such as the Home Menu in the pic) and there is no frame around taking additional space.

      I suppose I could have individual menus called according to data but to distribute changes to the system usually means re-creating menus with in/excluded functions for each client.
      Attached Files


      • #4
        Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

        Found this thread while searching for a way to do this myself. In the end I found a way to accomplish this. I figured I would share my solution for anyone else you finds this thread.

        As finish up my application for deployment with the Run Time I am implementing custom MenuBars and ToolBars. One of the options I have removed from these menus is the Design Mode button. However shortly after doing this I realized I did use this button quite a bit. So wouldn't be nice if it only showed up in the menu or ToolBar if NOT using the Run Time. I realize I can disable it but I don't want the end user seeing this greyed out button all the time.
        As it turns out MenuBars are just a Xdialog code with special markers that are interpreted to allow for proper formatting depending on orientation etc.

        - Add the to ToolBar the button you want to make conditionally appear. The latter steps will be easier if the toolbar only has a few buttons at this point.
        - Add an Enable Expression.
        - It would be best to test the toolbar to verify the enable expression works as expected before getting fancy.
        - In the Toolbar editor go to the Toolbar Appearance Tab
        - Use the Show Xbasic button on the button right of the screen (your changes will not appear in this screen till you save the ToolBar)
        - In the Dialog Body region locate the Xdialog code for the button you want make optionally visible. In my situation it was part of the following 3 lines;
        #SP#{Font=}{tag=3}<%B=System;T=Design Mode;I=$a5_triangle;%!!script_text:a5_sec_topparent_command("SYSTEM_DESIGN", "design")?topparent.restrict_edit=.f..and.a5_is_runtime()=.f.>

        - Copy out the part we are interested in which is just the button definition. Once again in my case;
        <%B=System;T=Design Mode;I=$a5_triangle;%!!script_text:a5_sec_topparent_command("SYSTEM_DESIGN", "design")?topparent.restrict_edit=.f..and.a5_is_runtime()=.f.>

        - exit the Xbasic dialog and return to the Toolbar Buttons Tab
        - Add an XD Free-form Xdialog button to your toolbar. This button will eventually replace the first instance of the button.
        - Click the Define Xdialog Code button
        - Insert the button definition obtained above adding the two Conditional Xdialog statements as shown below.
        - The conditional statement from the button or part of it is transferred to the first of the added statements as the conditional.

        <%B=System;T=Design Mode;I=$a5_triangle;%!!script_text:a5_sec_topparent_command("SYSTEM_DESIGN", "design")?topparent.restrict_edit=.f.>

        - In my case the Design Button completely disappears when the Toolbar is displayed in the RunTime.
        - If you go back to Xbasic view you will now see your custom code in the definition. While you can directly edit the Xbasic code your edits are undone when you go to save the Toolbar, I tried.
        Last edited by pboomwork; 04-04-2015, 10:45 PM.


        • #5
          Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

          Using the method in the above post you can easily increase the size of the [Record Number Selector].

          Just enter the following code in a XD Free-form Dialog.

          The number 8 in the above code is the width of the box. Make it as wide as you need to display really large number of records.


          • #6
            Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

            Just added another useful button to my standard form toolbar. This one will hide and unhide the control panel and the code editor if it is open. Once again this button only is visible if NOT in the run time.

            Just add the following code to a XD Free-form Xdialog button.

            <%B=System;T=Hide/Unhide Control Panel and Code Editor;I=$$window.controlPanel;%!!script_play_local("ZControlPanelOnOff")>
            This code runs the following script

            'Toggles the Control Panel and code editor between visable and activated and hidden
            IF ControlPanel.IsVisible()
            	IF is_object("Code_Editor")
            	end if
            	IF is_object("Code_Editor")
            	end if
            end if


            • #7
              Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling


              As long as we are on the topic of enhancing a toolbar....

              Do you know of a way to refresh the toolbar? For example, if I had a login button on a toolbar, it would be nice to replace that button with a logout button after logging in. Then, reversing on log out.

              The perfect scenario would be a refresh, not closing and reopening the toolbar.

              Also, do you know of a way to put ActiveX on a toolbar? For example, an Adobe Flash object?

              That would be pretty neat...

              Regardless, thanks for posting what you have already. It will likely be handy.


              • #8
                Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

                I am trying to follow your explanation.
                What does -
                Copy out the part we are interested in which is just the button definition
                mean? Cut or copy?
                What is the Record Number Selector you refer to in post #5?


                • #9
                  Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

                  Button definitions in xDialog are inclosed with the less then < greater than > signs. As stated in my original explanation the Button definition in my sample is;

                  <%B=System;T=Design Mode;I=$a5_triangle;%!!script_text:a5_sec_topparent_command("SYSTEM_DESIGN", "design")?topparent.restrict_edit=.f..and.a5_is_runtime()=.f.>

                  This Jumble of characters defines a single button on the toolbar. It is standard Xdialog code. Search the help system for Xdialog, Button Syntax for more information on this.

                  I located the button definition already created to use in the new button that I would be making conditionally disappear in the Toolbar. The new button I made conditionally disappear is created as a XD Free-form Xdialog button. The XD Free-form Xdialog buttons allows additional Xdialog code to be added that will conditionally insert the button definition in the the Toolbar.

                  It can be hard to locate the button of interest as it all looks like a jumble of letters, hence my advice on trying this with a simple Toolbar first. Also adding names to the Toolbar buttons will make locating them easier.

                  The two statements below are documented in the whats new in version 10 files. This only appears to work in Version 10.5 with the latest patch applied.

                  To reiterate I used a button definition that is created and tested as a standard button with an enable/disable expression. This button definition is then used to create a new button that conditionally disappears.

                  The Record Number Selector refer to in post #5 is shown in the image below. This box shows the current record but you can also type in a record number and press enter to select that record. Other post indicate that if you have over 1 million records the number will not completely fit in the box depending on your OS and default fonts. Post 5 explains how you can replace the box with one of your own making that is bigger.
                  4-5-2015 11-50-33 PM.png
                  Last edited by pboomwork; 04-06-2015, 09:24 AM. Reason: Answer 2nd part of question.


                  • #10
                    Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

                    In response to Post #7

                    As I stated in the original post Toolbars are just Xdialog code with special formatting characters added that allow A5 to reformat the Toolbar depending on where it is docked, horizontal, vertical, floating, etc. The XD Free-form Xdialog button type allows you to embed any Xdialog code in the Toolbar. If you can find a way to refresh a Xdialog from within the xdialog this should be possible, but I don't know what that would be. You most likely will need to use event code which is supported for the XD Free-form Xdialog buttons.

                    Just ran across the following method <OBJECT>.TOOLBARCHANGE() where <object> is a pointer to a form or browse. This should provide a way to reload the current toolbar or a different one without the Login Box.

                    It possible to embed ActiveX controls in an Xdialogs so it should be possible to add it to a Menubar. I would attempt to get your ActiveX control working in a standard Xdialog then try adding it to a Menubar.

                    Please let everyone know if you succeed in doing this.
                    Last edited by pboomwork; 04-06-2015, 10:28 AM.


                    • #11
                      Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

                      I will let you know. I suspect it is possible, too, just never did it. It's been an idea twirling in the corners of my mind for a couple months, but I have not had time to indulge myself in the theory.


                      • #12
                        Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

                        Great explanation Paul.


                        • #13
                          Re: A5 Toolbar - is there a way to remove items from view as opposed to disabling

                          Question on Post #6 - where did you put the script for the button event to show/hide the control panel?

                          Edit: Nevermind. If I could read, I would have seen that it is a saved global script...

                          The buttons do not align properly on my toolbar, but for the developer copy this is a great option to have.

                          Thanks, even if a bit late!
                          Last edited by MoGrace; 04-15-2018, 01:11 PM.

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