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

Open a second ui_dlg_box() centered over an existing ui_dlg_box()

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

    Open a second ui_dlg_box() centered over an existing ui_dlg_box()

    Is it possible to open a second ui_dlg_box() centered over an already opened ui_dlg_box().

    The first ui_dlg_box() isn't that large and usually will be moved to a location on the screen to
    facilitate data entry. During the process, it's possible for a second ui_dlg_box() to be opened
    that will display an error message.

    Currently when the second ui_dlg_box opens, it is centered in the screen. The first ui_dlg_box()
    could have been moved to the upper left hand corner.

    Appreciate your 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

    #2
    Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

    Don't do a lot with dialogs. Can the error message be open as embedded in the first or is the error dialog shared among other data entry dialogs?
    There can be only one.

    Comment


      #3
      Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

      I am sorry, but I do not understand your question...
      What is the purpose of the second dialog that will display the error message?
      Isn't to alert the user to the error? or that, there is an error somewhere?
      And once the user is aware of the error, wouldn't s/he close that dlg box and proceed from there?
      And once it's closed, what does it matter where on the screen it was?
      That's of course, unless you want to keep both of them open for some other reason..

      With all that said, you could position the dialog anywhere you want..be glad to illustrate how if I have a better understanding of what you are trying to accomplish.

      Comment


        #4
        Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

        I have an xDialog for data entry. On it are some buttons to fetch through the records. First, Last, Previous and Next.
        When clicking on the Previous and Next buttons, I am displaying a friendly message saying "No More Items...."
        After one second, the message goes away so the user doesn't have to click the OK button. The message box itself is not very large.

        As the data entry xDialog is not very large, when moved to the upper left hand corner of the screen, the friendly message being in the
        middle of the screen can be missed.

        This whole exercise is solely to make the application more user friendly. I just try to make the user interface into what I feel is
        professional looking.


        Code:
        ''handle NAVIGATION buttons, this can only happen if the "record" is not dirty ****************
        IF inlist2(a_dlg_button, "first,previous,next,last,PgUp,PgDn") THEN
        	SELECT
        		CASE a_dlg_button = "first"
        			tbl.fetch_first()
        			get_tbl_fields(tbl,rec)
        			orig_str = property_to_string(tbl)
        			
        		CASE a_dlg_button = "previous"
        			IF tbl.bof() THEN
        				NoMore()	'no more to fetch message
        			ELSE
        				tbl.fetch_prev()
        				get_tbl_fields(tbl,rec)
        				orig_str = property_to_string(tbl)
        			END IF
        			
        		CASE a_dlg_button = "next"
        			IF tbl.eof() THEN
        				NoMore()	'no more to fetch message
        			ELSE
        				tbl.fetch_next()
        				get_tbl_fields(tbl,rec)
        				orig_str = property_to_string(tbl)
        			END IF
        			
        		CASE a_dlg_button = "last"
        			tbl.fetch_last()
        			get_tbl_fields(tbl,rec)
        			orig_str = property_to_string(tbl)
        	END SELECT
        Code:
        FUNCTION NoMore as V ()
        	XDialogStyle.AccentColor = "Off White"
        	XDialogStyle.Color = "Blue White"
        	
        	ui_dlg_box("Oops",<<%dlg%
        {units=F}{font=Calibri,12}{xmargin=4,4}{ysize=.3}
        {Windowstyle=Gradient Horizontal};;
        {timer=close}{interval=1}
        	No More Items...;;
        %dlg%)
        end function
        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


          #5
          Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

          OK..that's better..
          Couple more questions:
          1-Is this modal/modeless?
          2-When you say "when moved to the upper left hand corner of the screen"
          Is that done by the user? Your script? what?

          Comment


            #6
            Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

            I'm working with a ui_dlg_box(). The user can move the dialog anywhere they want on the screen.
            I'm using the following to remember the dialogs location.
            Code:
            {position=remember=dlg_title}
            Code:
            dim dlg_title as C
            dlg_title = "Enter Item"
            
            DIM XDialogStyle as P
            XDialogStyle.AccentColor = "Off White"
            XDialogStyle.Color = "Blue White"
            DIM SHARED varC_result as C
            varC_result = ui_dlg_box(dlg_title,<<%dlg%
            {position=remember=dlg_title}
            {on_key=enter}
            {units=F}{font=Calibri,12}{xmargin=4,4}{ysize=.3}
            {Windowstyle=Gradient Horizontal};;
            
            {region}
            Item:| [%v%30.32rec.Item^+a_vcItem!chg_item];;
            Description:| [%v%30.32rec.Description^+a_vcDescript!item_*];;
            Price:| [16.18rec.Price!change];;
            {endregion};
            
            {line=1,0};;;
            
            {font="Verdana",7}
            {region}
             <%I=$a5_record_first%First Record!first?.not.dirty>
             <%I=$a5_record_previous%Previous Record!previous?.not.dirty>
             <%I=$a5_record_next%Next Record!next?.not.dirty>
             <%I=$a5_record_last%Last Record!last?.not.dirty>;;
            {font="Calibri",12}
            {initial_focus}<&New?.not.dirty><&Save?dirty><&Cancel?dirty> <&Delete?.not.dirty>{sp=10}<Cl&ose?.not. dirty>;
            {endregion};
            
            %dlg%,<<%code%
            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


              #7
              Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

              I just posted a working example of my project in the code archive. Download the zip file. Open the form, click on the items button, you will see the xDialog I'm working with and the error message I'm trying to locate.
              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


                #8
                Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

                To be clear, what you want is for the second dialog to follow the first one wherever it goes.
                You have several options:
                1-Use the second dialog as an embedded dialog, or
                2-Instead of the second dialog, use conditional control, or
                3-Use {text} to show the message, or
                4-In the second dialog use {remember} as you did in the first one, but here refer to the first dialog and preferably its triggering control and use one of the other options of {remeber} such as mouse, dropdown..etc. or,
                5-Which is an ugly option, make the second dialog big enough where it cannot be missed.
                Personally, I would go with option 3 and sometimes, I make the text blink so it cannot be missed..

                Comment


                  #9
                  Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

                  I tried #3, but I couldn't figure out how to refresh the dialog changing the {text} from "" to "No More Items..." and then back to "".
                  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: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

                    What do you use as a test that there are no more records?

                    Comment


                      #11
                      Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

                      Code:
                      		CASE a_dlg_button = "previous"
                      			IF tbl.bof() THEN
                      				NoMore()	'no more to fetch message
                      			ELSE
                      				tbl.fetch_prev()
                      				get_tbl_fields(tbl,rec)
                      				orig_str = property_to_string(tbl)
                      			END IF
                      			
                      		CASE a_dlg_button = "next"
                      			IF tbl.eof() THEN
                      				NoMore()	'no more to fetch message
                      			ELSE
                      				tbl.fetch_next()
                      				get_tbl_fields(tbl,rec)
                      				orig_str = property_to_string(tbl)
                      			END IF
                      Code:
                      FUNCTION NoMore as V ()
                      	XDialogStyle.AccentColor = "Off White"
                      	XDialogStyle.Color = "Blue White"
                      	
                      	ui_dlg_box("Oops",<<%dlg%
                      {units=F}{font=Calibri,12}{xmargin=4,4}{ysize=.3}
                      {Windowstyle=Gradient Horizontal};;
                      {timer=close}{interval=1}
                      	No More Items...;;
                      %dlg%)
                      end function
                      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


                        #12
                        Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

                        At the top of your script:
                        Code:
                        dim v_txt as C
                        v_txt=""
                        In the body put:
                        Code:
                        {text=v_txt};
                        At the code section:
                        Code:
                        CASE a_dlg_button = "previous"
                        			IF tbl.bof()
                        				V_txt="No more records"
                        			ELSE
                                                        v_txt=""
                        				tbl.fetch_prev()
                        				get_tbl_fields(tbl,rec)
                        				orig_str = property_to_string(tbl)
                        			END IF
                        Same with tbl.eof()

                        Comment


                          #13
                          Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

                          Darn that was simple. But...... how would you make V-txt automatically go back to "" after 1 second.
                          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


                            #14
                            Re: Open a second ui_dlg_box() centered over an existing ui_dlg_box()

                            Figured it out. Added this to the ui_dlg_box()
                            Code:
                            {watch=v_txt!Clear}
                            Then this to the <<%code%

                            Code:
                            case a_dlg_button = "Clear"
                              if v_txt <> "" then
                              sleep(1)
                              v_txt = ""
                            end if
                            Thanks G.
                            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