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

x_Dialog Tab Stops

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

    x_Dialog Tab Stops

    I have a dialog box that displays data in a list box. It is for view only, and I use tab stops to align the data.

    My question is can I dictate the alignment of the tab stop? Currently, all data is aligned "left". Certain fields, like time, or money would be best aligned "right", and a "true/false", "Yes/No" field would b e best aligned center.

    the attached is what is displayed using the below code.
    Code:
    'Date Created: 09-Apr-2015 10:07:16 AM
    'Last Updated: 09-Apr-2015 04:05:02 PM
    'Created By  : Thomas Henkel
    'Updated By  : Thomas Henkel
    'debug(1)
    dim filt as C = replace_parameters("emp_id = [varN->empid]",local_variables())
    list = table.external_record_content_get("Time_off","Req_date+\"|\"+req_type+\"|\"+alltrim(str(req_hrs,6,2))+\"|\"+req_ampm+\"|\"+sup_resp","dtos(req_date)",filt)
    
    dim heading as C = "Date|Type|Hours|AM/PM|Approved"
    
    Dim format as p 
    Format.tab_stops=".8,1.7,2.2,3"
    Format.font="Arial,10,b"
    Format.odd_row_color="#254+254+193"
    Format.font_color_unselected="Red"
    heading = a5_owner_draw_list_fmt(heading,Format)
    Format.font="Arial,10"
    Format.odd_row_color="White"
    Format.even_row_color="Blue White"
    Format.font_color_unselected="Blue"
    Format.font_color_selected="White"
    Format.alternating_bands=.t.
    list = a5_owner_draw_list_fmt(list,Format)
    'list=heading+list
    heading_string = "Review your Time Off Requests "
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    
    varC_result2 = ui_dlg_box(agency,<<%dlg%
    {Background=#254+254+193}
    {region}
    {text=55,1:heading_string};
    {endregion};
    {line=1,0};
    ;
    {region}
    {text=%O={@@}%95,1:heading};
    [%O={@@}%.95,8test^#list];
    {endregion};
    ;
    {line=1,0};
    {region}
    <*15:OK> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%)
    It may seem like a small thing, but it would be a much cleaner look if I could choose how to align on the tab stop.

    Time_off.jpg

    any help would be appreciated.

    Thanks,

    Tom

    #2
    Re: x_Dialog Tab Stops

    Try controlling that in the

    list = table.external_record_content_get("Time_off","Req_date+\"|\"+req_type+\"|\"+padl(alltrim(str(req_hrs,6,2)),9,\" \")+\"|\"+req_ampm+\"|\"+sup_resp","dtos(req_date)",filt)

    Just a guess.
    Last edited by Stan Mathews; 04-10-2015, 10:49 AM.
    There can be only one.

    Comment


      #3
      Re: x_Dialog Tab Stops

      An interesting idea, but then I would need to know how to center justify the "req_ampm", and the "Sup_resp" fields. Having the tab do "real" justification would be the cleanest solution.

      Tom

      Comment


        #4
        Re: x_Dialog Tab Stops

        Fully agree on the justification issue.

        You can use padc() to simulate it but if the values to be displayed have different numbers of characters (true/false) then the pad method doesn't really work.

        tf = "true"
        ? padc(tf,6," ")
        = " true " 'centered 4 in 6
        tf = "false"
        ? padc(tf,6," ")
        = " false" 'no room for proper centering 5 in 6
        There can be only one.

        Comment


          #5
          Re: x_Dialog Tab Stops

          Can you show an HTML table based list on the xdialog and use the HTML justification options?
          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


            #6
            Re: x_Dialog Tab Stops

            Al,
            I am not really well versed in HTML coding, so I am not sure I could even attempt that.

            but, thanks,

            Stan,

            I tried the "padl" suggestion above, and it does (sort of) right justify the numbers, but, again, using a true type font, spaces don't always push different length numbers to the same position.

            Tom

            Comment


              #7
              Re: x_Dialog Tab Stops

              Using Html to center text:
              Code:
               style="text-align: center;"><strong><span style="font-size: 14pt;"><span style="color: #0000ff;">Hello World</span></span></strong>
              This aligns to center, sets to bold, font size to 14.
              How to make this to what you want is beyond me.
              Dave Mason
              [email protected]
              Skype is dave.mason46

              Comment


                #8
                Re: x_Dialog Tab Stops

                Well, Dave, THAT helps a lot (lol)

                Comment


                  #9
                  Re: x_Dialog Tab Stops

                  Tom, I have to write a lot of html and js, but no expert. Just never thought it would be possible on alpha desktop like you are doing.

                  If it helps, would you please show us the final results so others(including me) might be able to use it?
                  Dave Mason
                  [email protected]
                  Skype is dave.mason46

                  Comment


                    #10
                    Re: x_Dialog Tab Stops

                    Dave,

                    I read your html post again, and what I need to do is to make the {tab} stop a left, center, or right aligned tab stop, like a word processor would. It is no real big deal, I'm just trying to get fancy with my dialog.

                    I am not about to write a lot of HTML and JAVA Script code just to display this little dialog. I just thought there would be a "nice" way to get things formatted a little better.

                    This is all part of a project to do away with a paper request for time off. I'm giving the worker a chance to see what they have already requested so they don't go through the exercise of requesting the same time/day off and get told that they already requested that time/date in another dialog.

                    We have plans of integrating this into our personnel system so that after the day/time passes, we automatically push the info into their used/available time records.

                    Another piece is to push the approved time to our imail shared calendars, so that the supervisor doesn't have to go and post the time off to the calendar.

                    I've tested pushing the requested time to my outlook calendar, and that works great. We just need to look further into the ipswitch (imail) stuff.

                    Tom

                    Comment


                      #11
                      Re: x_Dialog Tab Stops

                      I found an earlier thread suggesting the use of transform() in the table.external_record_content_get() content expression to right justify numerical values. No joy on the true/false yes/no unless you go with T/F Y/N. Also required the use of a fixed width font.
                      Last edited by Stan Mathews; 04-10-2015, 04:07 PM.
                      There can be only one.

                      Comment


                        #12
                        Re: x_Dialog Tab Stops

                        The word "center" in the html can be "left" or "right"

                        Like I said, I have no idea that it can be used where you need it, but trying to lend a bit of help for html.

                        I do use html at times in bubble help for a better presentation.
                        Dave Mason
                        [email protected]
                        Skype is dave.mason46

                        Comment


                          #13
                          Re: x_Dialog Tab Stops

                          Thanks, guys, but right now, I have much more to do than worry about centering or right justifying one of many, many dialog displays I will need for this system.

                          All your suggestions are greatly appreciated and maybe, when I can, I will try the HTML method.

                          Again, Thanks.

                          Tom

                          Comment


                            #14
                            Re: x_Dialog Tab Stops

                            An example : convert a browse to XML and use it in an Xdlg.
                            Without a sample I made a simple table. Do this named embedbrxml.dbf as follows
                            Code:
                            Date	Date	8	0	
                            Type	Character	15	0	
                            Hours	Numeric	7	2	
                            Ampm	Character	2	0	
                            Approved	Character	14	0
                            Add a few records and run this code
                            Code:
                            'Date Created: 12-Apr-2015 03:46:11 PM
                            'Last Updated: 12-Apr-2015 04:22:58 PM
                            'Created By  : Ray
                            'Updated By  : Ray
                            dim dlg_title as c 
                            dim dlg_body as c 
                            dim dlg_event as c 
                            dim browseObj1_browse_definition as c 
                            dim browseObj1_tablename as c 
                            
                            browseObj1_tablename = "embedbrXml.dbf"  'Your table name
                            
                            
                            dim StatusAreaCommand as c = ""
                            dlg_title = "Bergen County Board ..."
                            
                            dlg_body = <<%dlg%
                            {Background=#254+254+193}
                            {region}
                            {lf};
                            {font= arial, 10, bi }
                            {COLOR= Black ON Yellow }
                            
                            
                            Review your time off requests;
                            {line=1} 
                            {lf};
                            {font= arial, 12}
                            {removecomments}
                            {can_exit=close}
                            {startup=init}
                            {xmargin=0}{ymargin=0}
                            {stretch=height,width}
                            {watch=browseObj1.mode_get()!modechange}
                            {card=80,8BrowseCard_browseObj1};
                            {lf};
                            %dlg%
                            
                            dlg_body = stritran(dlg_body,"__StatusArea__",StatusAreaCommand)
                            
                            
                            dlg_event = <<%code%
                            if a_dlg_button = "close" then 
                            	ui_modeless_dlg_close(dlg_title)
                            end if 
                            if a_dlg_button = "init"
                                    a_dlg_button = ""    
                                    browseObj1 = a5_XdialogDefaultBrowse(dlg_title,"Browsecard_browseObj1",browseObj1_tablename,"browseObj1_browse_definition")
                                    browseObj1.Status_format = "\"\""
                            end if '																							This browse_definition see below
                            %code%
                            
                            browseObj1_browse_definition = <<%xml%
                            <browse width="1077" height="366" drop_down_menu="&lt;None&gt;" right_click_menu="&lt;None&gt;" toolbar="&lt;None&gt;" restrict_enter="yes" restrict_change="yes" restrict_delete="yes" restrict_find="yes" restrict_range="yes" restrict_index="yes" restrict_query="yes" restrict_column_resize="yes" restrict_column_move="yes" restrict_column_delete="yes" restrict_split="yes" restrict_editing="yes" data_entry_style="default" row_height="19" scrollbar_tooltip="key" filter="*remembered()">
                            <title showtitles="yes" color="Win3D" accent_color="White" fill_style="Gradient Horizontal" line_style="solid" line_color="Gray-25" top="2" onclick_behaviour="Select">
                            	<font color="Red" name="Times New Roman" size="8" bold="yes"/>
                            </title>
                            <cells>
                            	<cell color="+L5System-ButtonHighlight" 
                            </cells>
                            </browse>
                            %xml%
                            
                            
                            
                            ui_dlg_box(dlg_title,dlg_body,dlg_event)

                            Comment


                              #15
                              Re: x_Dialog Tab Stops

                              Thanks, Ray. I'll check it out tomorrow.

                              Its funny, looking at your code, I do remember putting together an xml browse dialog a couple of years ago. I also remember that I used Alpha's "convert to xml" tool to get there. With a little tweaking, it really paid off, and our receptionists use it all the time. Thanks for jogging my old brain a bit.

                              Tom
                              Last edited by Tom Henkel; 04-12-2015, 04:16 PM.

                              Comment

                              Working...
                              X