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

How to align column titles with list box columns

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

    How to align column titles with list box columns

    Is there some way to align column titles with the columns in an xdialog list box. Right now, I can do this by trial and error, but if I run the xdialog on a different computer, the titles are mis-aligned. vcTitlerow is the variable with the list box column title. I built the list box initially using the genie and the advance button. Is there an option to add a title?

    Code:
    DIM GLOBAL vList as C
    DIM vOrder as C
    dim dlg_title as C = "Lookup Envelope Number"
    DIM vFilter as C
    DIM SHARED varC_result as C = ""
    DIM XDialogStyle as P
    XDialogStyle.AccentColor = "blue white" '"off white"
    XDialogStyle.Color = "blue white"
    DIM vcTitleRow AS C
    vcTitleRow  = "Env#" + space(6) + "Last, First Name" + space(10) + "Name" + space(30) + "Street" + space(42) + "City"
    
    startover:
    
    '' set auto_list_vList 'order' and 'filter' variables
    vReturn = "\" \"+envnumber + \"|\" + Alphid + \"|\" + name + \"|\" + address2 + \"|\" + city"
    vOrder = "envnumber"
    vFilter = "alphid <> 'save!!!'"
    
    auto_list_vList = table.external_record_content_get("fam2006",vReturn ,vOrder ,vFilter)
    
    Dim format as p 
    Format.tab_stops=".5,2,3.75,5.75"
    Format.odd_row_color="White"
    Format.even_row_color="White"
    Format.odd_selected_color="Dark Blue"
    Format.even_selected_color="Dark Blue"
    Format.font="Arial,10"
    Format.font_color_unselected="Black"
    Format.font_color_selected="White"
    Format.lastbutton="OK"
    Format.group_size=1
    Format.number_rows=.f.
    Format.alternating_bands=.f.
    
    'Apply 'owner draw' formatting information to the list
    auto_list_vList = a5_owner_draw_list_fmt(auto_list_vList,Format)
            
    temp_count = w_count(auto_list_vList,crlf())
    DELETE a_vList
    DIM a_vList[temp_count] as c
    a_vList.initialize(auto_list_vList)
    close_button_label = "&Close"
    varC_result = ui_dlg_box(dlg_title,<<%dlg%
    {Windowstyle=Gradient Horizontal}
    {xmargin=3,3}
    {region};;;;
    {color=Black on White};
    {font=arial,10,b}
    {text=%H=R%130,vcTitlerow};
    {region}
    [%d;O={@@}%.130,20vList^#a_vList];;;;
    {endregion};
    {region}
     <*12,1.5=close_button_label!CLOSE>
    {endregion};
    %dlg%,<<%code%
    
    if a_dlg_button = "closeSettingChanged" then 
        a_dlg_button = ""
        p.closeAfterFind = flagCloseAfterFind
        a5_save_settings("Find_Item",p)
    end if 
    
    IF a_dlg_Button = "Close"
        ui_modeless_dlg_close(dlg_title)
    END IF
    
    %code%)
    
    END
    Thank you,

    Ron
    Attached Files
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    #2
    Re: How to align column titles with list box columns

    Since no one responded to this post, I decided to take a different approach. I started with an xdialog example in Alpha Sports. It has worked out quite well with the exception that I can not figure out how to set a larger font. On my computer, the font appears to be a number 8. I would like to change it to a number 10. Would someone please look at the attached example and give me an idea how I may do this.

    Thank you,

    Ron
    Attached Files
    Alpha 5 Version 11
    AA Build 2999, Build 4269, Current Build
    DBF's and MySql
    Desktop, Web on the Desktop and WEB

    Ron Anusiewicz

    Comment


      #3
      Re: How to align column titles with list box columns

      Ron

      Does an xdialog with an embedded browse work for you?

      browse2xdialog.png
      Al Buchholz
      Bookwood Systems, LTD
      Weekly QReportBuilder Webinars Thursday 1 pm CST

      Occam's Razor - KISS
      Normalize till it hurts - De-normalize till it works.
      Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
      When we triage a problem it is much easier to read sample systems than to read a mind.
      "Make it as simple as possible, but not simpler."
      Albert Einstein

      http://www.iadn.com/images/media/iadn_member.png

      Comment


        #4
        Re: How to align column titles with list box columns

        Nice dialog!!

        Unfortunately, I have no idea how to set the font for the data. But if someone can figure it out, I want to know, too.

        I do have 3 minor complaints about the way Alpha sets up xdialogs. There is nothing "wrong" with them and I suspect they are the result of genie requirements in case other things are done that aren't done in this xdialog. My only issue is that these things can add confusion for someone who is trying to understand how to build/edit xdialogs and I'm hoping some clarification will help someone.

        1. Alpha over uses regions. All the regions in this xdialog can be removed. There is absolutely no need for them. Regions are generally only needed to align fields in columns or, very rarely, to add another region to the right of an existing region (in which case you would not put a ";" after the first region). However, without the regions in this xdialog you will probably want to add an "{sp};" before the Close button to separate it from the list a bit. Why? Because of one of my pet peeves - every {endregion} command adds extra blank space and when it's necessary to embed a bunch of regions that blank space can become excessive and make it impossible to get a more desirable smaller spacing at the end of the group of regions.)

        2. The Close button can be simply <Close>. The result is identical to <Close!close> with the one minor exception that the first one returns "Close" and the second returns "close". However, I don't think most of us do an exact comparison to check for capitalization; I know I don't.

        3. This one is a bit person preference but I think it's justifiable. It definitely can make an "ease of debugging" difference when the %code% section is extensive. (It's no big deal when there are only 2-3 short IF statements in the %code% section.) The %code% section is a series of IF ... END IF statements but I prefer a series of IF...ELSEIF statements. In most cases, the a_dlg_button variable is what the IF is testing and the a_dlg_button variable itself never changes. Since it never changes, there is no need to evaluate every IF separately. HOWEVER, in those rare cases where the a_dlg_button variable IS changed, a series of IF...ELSEIF statements followed by a separate IF...END IF statement is a major clue that the a_dlg_variable could have been changed somewhere in the previous ELSEIF statements.

        In my own code, if I see a separate IF...END IF statement I KNOW there is a 90% chance that I need to check for a change to the a_dlg_button in the ELSEIF section and I verify that very quickly by looking at that one IF...END IF to find out exactly what might have changed. When I get other peoples' code and don't know for sure what is happening, I often have to check every IF...END IF to find out if the a_dlg_button might have been changed - and that can waste a lot of time when the code is extensive. Sure, it's rare but does happen. (And I hate wasting my time because of sloppy code.)

        I know some people won't understand #3 so here's one example. Let's assume I have some code with a series of IF...END IF statements and something isn't working right. So I look at the last IF...END IF, which happens to be something like the 9th one, and it checks to see if a_dlg_button is "OK" and handles it correctly. However, sometimes my xdialog isn't doing what I want it to even though all the code in that "OK" section looks correct. What I don't see right away, because of the amount of code preceding the "OK" check, is that the 3rd IF...END IF statement can sometimes change a_dlg_button to "OK". Now if that same code was a series of IF...ELSEIF statements followed by one IF...END IF to test for a_dlg_button = "OK", then it would be pretty obvious to me that the value of a_dlg_button might have been changed somewhere in the previous ELSEIF statements and I would start the search right away rather than getting angry because I can't figure out what's wrong with the "OK" check.

        This doesn't make the code work any better. It just makes it easier to debug.

        Comment


          #5
          Re: How to align column titles with list box columns

          Thanks Cal for your response. I've used your recommendations on a number of my xDialogs. You put out code on how to create truly amazing xdialogs and I reference it all the time.

          Al, I been trying to move away from browses and forms when an xdialog can do the same job. I find their functionality and cleanliness in appearance very desirable at times. Less is better if it does the job.

          However; I may end up giving your suggestion a try.

          Thanks,

          Ron
          Alpha 5 Version 11
          AA Build 2999, Build 4269, Current Build
          DBF's and MySql
          Desktop, Web on the Desktop and WEB

          Ron Anusiewicz

          Comment


            #6
            Re: How to align column titles with list box columns

            Originally posted by CALocklin View Post
            Nice dialog!!
            Which dialog? I know you know, but...
            Originally posted by Ronald Anusiewicz View Post
            Al, I been trying to move away from browses and forms when an xdialog can do the same job. I find their functionality and cleanliness in appearance very desirable at times. Less is better if it does the job.
            There must be something I'm missing here...
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              Re: How to align column titles with list box columns

              I've had no problem aligning columns in Xdialog simply by changing the font:

              Code:
              {font=Courier New,10}
              (I haven't yet downloaded at your attachment.)

              Steve

              Comment


                #8
                Re: How to align column titles with list box columns

                Steve,
                It's a ListView dialog. That doesn't work. I can't figure it out, either.
                Mike W
                __________________________
                "I rebel in at least small things to express to the world that I have not completely surrendered"

                Comment


                  #9
                  Re: How to align column titles with list box columns

                  Hi Al,

                  I do not like the way Alpha�s browse works.

                  For instance, the scroll bar, if the browse is not fully populated, the scroll bar expands and fills the slot touching the up arrow and down arrow. If you change the index, the browse can redraw and only show one record. The only way to view the other records is to mouse click on the up arrow. It�s my belief that I should be able to grab the scroll button with the mouse and scroll the browse back up to the top. In an xdialog, you always see all the records no matter what the index.

                  Second, when you do have more records and the browse is full, scrolling does not move anything until you stop the scroll and release the mouse button. This is confusing and it makes it hard to scroll and find a record. In an xdialog, When you grab the scroll button and move it, the list moves making it very easy to scroll through the list and find what you are looking for. Actually, I'm writing this response and the scrolling in this box works the same as an xdialog.

                  I find these two issues annoying and I watch users use the browses and I can tell that they are confused by what they are seeing.

                  Just my thoughts.

                  Ron
                  Alpha 5 Version 11
                  AA Build 2999, Build 4269, Current Build
                  DBF's and MySql
                  Desktop, Web on the Desktop and WEB

                  Ron Anusiewicz

                  Comment


                    #10
                    Re: How to align column titles with list box columns

                    Ron

                    Thanks for the details. It certainly helps to work with specifics rather than generalized comments.

                    Perhaps those watching will see this and add comments.

                    In the meantime, it would be interesting to compare the pros and cons of the browse in xdialog..
                    Al Buchholz
                    Bookwood Systems, LTD
                    Weekly QReportBuilder Webinars Thursday 1 pm CST

                    Occam's Razor - KISS
                    Normalize till it hurts - De-normalize till it works.
                    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                    When we triage a problem it is much easier to read sample systems than to read a mind.
                    "Make it as simple as possible, but not simpler."
                    Albert Einstein

                    http://www.iadn.com/images/media/iadn_member.png

                    Comment


                      #11
                      Re: How to align column titles with list box columns

                      Originally posted by Ronald Anusiewicz View Post
                      I do not like the way Alpha’s browse works.

                      ...

                      I find these two issues annoying and I watch users use the browses and I can tell that they are confused by what they are seeing.
                      I agree. And I think the idea of having a Find operation put the selected/found record in the middle of the browse is also confusing. Does any other database do that? Personally, I find no use for that "feature" other than confusing users.

                      Here's another one I discovered in the last day or two. Go to the default browse then go to the menu bar and select Records / Advanced / Apply Range and select either Marked (if you have any) or Not Marked then go back to the browse and hit the Up arrow. On my system the Up arrow only goes down - just like the Down arrow. The only way to go "up" is to use the mouse to click on the record or use the scroll bar once you get it working.

                      Comment


                        #12
                        Re: How to align column titles with list box columns

                        Here is an example of where I would like to go with a browse used to navigate records displayed on a form. This isn't polished to where a finished form would be functionally, but I think you will get the idea. A form showing one record with a browse used as a read only, easily navigable to select a record for viewing. Clicking on the column title changes the sort order.
                        Attached Files
                        Alpha 5 Version 11
                        AA Build 2999, Build 4269, Current Build
                        DBF's and MySql
                        Desktop, Web on the Desktop and WEB

                        Ron Anusiewicz

                        Comment

                        Working...
                        X