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

Color Rows in an Embedded Browse

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

    Color Rows in an Embedded Browse

    The attached zip file contains a database with one form. The form has one control - an embedded browse. The Part Code DBF table has two fields - Part_Code and Part_Desc. The table does not use an index, and contains just 14 items. In an application, this information is for reference and is seldom changed.

    I would like to color every other row of the Browse to simulate "green-bar" paper. Not such a big deal for this table, but I would like to do this for more complex situations, as well.

    In the Xbasic CHM docs there is an article titled: "How to Color Alternating Rows in an Embedded Browse". The example uses a one-to-many child table, but my form has one primary table.

    Last December, Daniel Weiss posted an idea that may be good for a table without an index, but I have not found a way to use his approach for an embedded browse. "Enter the following color equation for each column."
    case(mod(recno(),2)=0,"Black on Aqua",.T.,"Black on White")

    So far, the only result that I have had is to color all of the rows. I have not been able to color every other row.

    I have probably overlooked something really basic. Any ideas would be appreciated.

    Bruce Warner

    #2
    RE: Color Rows in an Embedded Browse

    Bruce,

    Thanks for bringing this up...I've been meaning to play with this for a while and just haven't gotton around to it.

    See screenshot attached.

    This was accomplished by placing the following code in the "color equation" of each column in your browse.

    mod(recno(),2)=0

    I used the Genie to specify the colors.

    Louis

    Comment


      #3
      RE: Color Rows in an Embedded Browse

      Louis,

      If you are using this form just to look at a list consider Xdialog. I think it was Selwyn who gave a tutorial on the some time back. I know how much yuou like Xdialogs.

      Keith Hubert
      London.
      Regards
      Keith Hubert
      Alpha Guild Member
      London.
      KHDB Management Systems
      Skype = keith.hubert


      For your day-to-day Needs, you Need an Alpha Database!

      Comment


        #4
        RE: Color Rows in an Embedded Browse

        Keith,

        I agree, but...

        This was Bruce's request. I considered suggesting X-Dialog to him as well, but don't know his background with the language.

        The approach posted above is quick and simple and was created using Bruce's database and Action Scripting...less than one minute of work.

        And you're right, I love X-Dialog and the power, flexibility and professional look and feel it produces!

        Best regards from the other side of the pond.

        Louis

        Comment


          #5
          RE: Color Rows in an Embedded Browse

          Louis,

          The attached screen shot shows that your suggestion does the job. Thank you for your help.

          Keith and Louis, yes, I would like to see an Xdialog solution.

          Bruce Warner

          P.S.

          Comment


            #6
            RE: Color Rows in an Embedded Browse

            Louis's code equation works fine (as does the original code Sewlyn provided) - EXCEPT in a memo field within a browse, since the column properties for a memo field does NOT have an 'Other' tab on which to place the color equation.

            Does anyone know how to incorporate a color equation in a memo field in a browse?

            Dave
            Dave Jampole
            www.customalpha.com

            Women and cats will do whatever they want. The sooner men and dogs realize that, the happier they will be.

            Comment


              #7
              RE: Color Rows in an Embedded Browse

              Hi Dave,

              I don't see how this could work since a memo field doesn't have "lines". It just wraps at points determined by the display.

              Bill
              Bill Hanigsberg

              Comment


                #8
                RE: Color Rows in an Embedded Browse

                Louis:
                Where do you define the color in the genie?

                charlie crimmel

                Comment


                  #9
                  RE: Color Rows in an Embedded Browse

                  Hi Bill,

                  It would be nice if it would/could work in a memo field. I have two browses in a form and because of this 'problem', coloring all but the memo field in the one browse would not look too good. Oh well, black on white will have to do.

                  Dave
                  Dave Jampole
                  www.customalpha.com

                  Women and cats will do whatever they want. The sooner men and dogs realize that, the happier they will be.

                  Comment


                    #10
                    RE: Color Rows in an Embedded Browse

                    Charlie,

                    On the browse select a column, right click, select properties, select the other tab, check enable color equation, then if you click on the x/y on the color equation it brings up the color equation genie. There you can set the text color and background color and enter or modify the color equation.


                    Hope this helps

                    Phil

                    Comment


                      #11
                      RE: Color Rows in an Embedded Browse

                      When I do that it changes colors on 2 lines instead if alternating lines.
                      see attached jpg.

                      charlie crimmel

                      Comment


                        #12
                        RE: Color Rows in an Embedded Browse

                        Charlie,

                        I suspect that your embedded browse is either filtered, thus causing some record numbers to not be displayed or...

                        Sorted in such a way that the records displayed are not in record number order.

                        Selwyn posted a solution to this about a year back. If I rember correctly, it uses a couple of calculated fields to count the number of rows in the browse, then color every other row.

                        This resolves the issue you are havein, but if you hava a lot of records in the browse, it can take a while, (a second or two) when the record is fetched to run through the process...makes the colorization of the alternating rows a bit choppy.

                        I'll look for the post and let you know if I find it.

                        Louis

                        Comment


                          #13
                          RE: Color Rows in an Embedded Browse

                          Charlie,

                          Here is the solution from Selwyn...

                          http://msgboard.alphasoftware.com/alphaphorum/read.php3?sortby=lastreply&direction=desc&num=11&id=5069&thread=4992#MSG5061


                          Louis

                          Comment


                            #14
                            RE: Color Rows in an Embedded Browse

                            Louis:
                            Thanks. That worked

                            Charlie Crimmel

                            Comment

                            Working...
                            X