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

Database Colours

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

    Database Colours

    That right with a "U"!

    Seems these custom colours are attached to an individual dbf.

    Any way of making them system wide or at least copyable to another dbf.

    Thanks "eh"

    John

    #2
    Re: Database Colours

    Hi John,

    The colour definitions are stored in the .adb file of the application so they are at least usable application wide. (But that is probably what you meant, eh)

    Check out A5.LOAD_USER_COLORS() and A5.SAVE_USER_COLORS()

    After using the load colours I would try saving the resultant dot variable to a text file which you could import in the second application. Check out PROPERTY_TO_STRING() for this.

    Tim
    (an ex Ontario resident)
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

    Comment


      #3
      Re: Database Colours

      Tim

      Thanks very much

      John

      Comment


        #4
        Re: Database Colours

        I'd like to help but I don't speak Canadian.:D

        However, if you can read American, this might help a little bit....

        I noticed that Tim mentioned the Save_user_colors() functions. I believe these are just for system colors - not the colors saved for the application.

        FWIW: These system colors can be a great help. I modified mine so certain types of code (text strings for one and %dlg% sections for another) stand out better. I especially like having the colors modified when hard coding HTML. By changing the backgrounds I can easily identify the HTML sections vs. the xbasic sections.

        Back to the application colors:

        I created a routine to get the current colors - that didn't take long at all - but found out it would take a lot longer to enter them into another app. IF it was a simple overwrite, it might not be too bad but I hate to do something like this without checking for existing colors before overwriting them and allowing the user to select which colors to add/overwrite.

        Here's the "get" routine. As-is, it's a script. If you want to make it a function to return the colors as a character string, just unrem the "FUNCTION" and "END FUNCTION" lines. At the very least, this might make it easier to copy the colors into another app.
        Code:
        'Date Created: 07-Apr-2009 09:09:58 AM
        'Last Updated: 07-Apr-2009 09:09:58 AM
        'Created By  : Cal Locklin
        'Updated By  : Cal Locklin
         
        'FUNCTION Global_colors_get as C ()
        DIM global_colors_get as C
        global_colors_get = "" 'FYI
        appname = file.filename_parse( a5.Get_Name(), "N" )
        dp = dictionary.open( a5.Get_Path() + chr(92) + appname + ".alb" )
        dp.fetch_first()
        WHILE .not. dp.fetch_eof()
            IF dp.name = "Global Colors"
                global_colors_get = trim( dp.contents_m )
                dp.fetch_last()
            END IF
            dp.fetch_next()
        END WHILE
        dp.close()
        
        IF global_colors_get = ""
            msg = "No color definitions were found in this application."
            ui_msg_box( "NO COLORS FOUND", msg, ui_attention_symbol )
        ELSE
            'If changed to a function, none of this is necessary - but you 
            'might want to keep them anyway.
            clipboard.Set_Data( global_colors_get )
            'ui_msg_box( "COLORS", global_colors_get )
        END IF
        'END FUNCTION

        Comment


          #5
          Re: Database Colours

          If what you want to do is to pull a set of custom-defined colors from one database to another you could download the copy utilities I placed in the code archive and use it. Select "Global Colors" as the "object" (something of a misnomer) and select the source and destination databases. You will need to close and reopen the database to see the new colors which will be available in the color picker list.

          Because the colors are stored in a data dictionary record, but the panel for defining said colors is part of the adb file, you will see the colors in the pick list but you will not see the color definitions under Database, settings, colors.
          Finian

          Comment


            #6
            Re: Database Colours

            Tom & Finian

            Thank you both very much. I will try both methods.

            My "cheque" is in the mail.

            John

            Comment


              #7
              Re: Database Colours

              Hi Tim,

              Originally posted by Tim Kiebert View Post
              ...The colour definitions are stored in the .adb file of the application so they are at least usable application wide. (But that is probably what you meant, eh)

              Check out A5.LOAD_USER_COLORS() and A5.SAVE_USER_COLORS()
              ..........
              Tim
              (an ex Ontario resident)
              For those down under, and Canada and the UK, I have 2 functions that might help you a bit that I have listed below
              Code:
              FUNCTION A5.LOAD_USER_COLOURS AS C (name="" as c, colour_info as p)
              'DESCRIPTION: Saves custom colour definitions
              
              A5.LOAD_USER_COLOURS=A5.LOAD_USER_COLORS(name,colour_info)
              END FUNCTION
              
              
              FUNCTION A5.SAVE_USER_COLOURS AS C (name="" as c, colour_info as p)
              'DESCRIPTION: Loads custom colour definitions into variables
              
              A5.SAVE_USER_COLOURS=A5.SAVE_USER_COLORS(name,colour_info)
              END FUNCTION
              I hope this helps internationalize Alpha a bit more!:D
              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: Database Colours

                IRA

                I'm impressed, even spelt correctly.

                Thanks, John

                Comment


                  #9
                  Re: Database Colours

                  Ira,

                  :D You are oohhh so helpful.

                  Cal,
                  May be the aussie accent made it even harder to understand the Canadian lingo. :) But those two functions (the ones Ira so graciously interpreted for us) do access the same info that the code you posted does. Your code seems to result in one block of txt(from a memo field) that contains all the colo(u)rs in a bunch where as A5.LOAD_USER_COLORS() divides each colour into seperate items in a pointer array.

                  Then we have Finian's utility. A couple of clicks and its done. Nice. I don't know, but imagine that Finian's code is accessing the alb the way your code does.

                  Any way it looks like we have this issue colored. Oops, I mean covered.
                  Tim Kiebert
                  Eagle Creek Citrus
                  A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                  Comment


                    #10
                    Re: Database Colours

                    <<I don't know, but imagine that Finian's code is accessing the alb the way your code does.>>

                    Tim:

                    It's pretty simple really. The utility is based entirely on appending data dictionary records. As in, convert the source and destination data dictionaries to tables, get rid of the records you don't want in the source and append to the destination the ones you do.
                    Finian

                    Comment


                      #11
                      Re: Database Colours

                      Finian,
                      Thanks for the explanation. Simple maybe, but very effective.
                      Tim Kiebert
                      Eagle Creek Citrus
                      A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

                      Comment


                        #12
                        Re: Database Colours

                        Originally posted by CALocklin View Post
                        .... Save_user_colors() functions. I believe these are just for system colors - not the colors saved for the application.
                        My apologies for being so far off on that one - 180 degrees off in fact.

                        However, my other comments remains. If you haven't looked into editing your system colors (View/Settings/System/System Colors) you might want to. It allows you to change background colors as well as font colors for various types of code. The default colors don't provide enough variation in my opinion.

                        I've attached a copy of my own colors if you want a starting point. These are the definitions that work on my monitor. I had to change them when I went from the old CRT monitor to the LCD monitor so be aware that there may be minor differences on your monitor. (And, if you don't like my colors at all, to bad - change 'em.:p)

                        To import my file:
                        - download it to your system
                        - change the extension to .a5t (I had to change it to upload it)
                        - put the file under "Application Data" in your "Alpha Five Version 9" folder. It should be something like "C:\Documents and Settings\<UserName>\Application Data\Alpha Software\Alpha Five Version 9" in XP.
                        - Open A5, go to View/Settings/System/System Colors and click the Load button. (I'm not sure if you need to save the existing colors as default. I doubt it but you might want to just in case.)

                        Comment

                        Working...
                        X