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

Message Box With Yes/No Buttons

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

    Message Box With Yes/No Buttons

    Anyone have a message box with yes no buttons that looks good? Will you share the code? I can create a message box but cant get it to look nice. Thanks!

    #2
    Re: Message Box With Yes/No Buttons

    Alpha has this built in. Is it not pretty enough? ...you can change it's style too.

    Ashampoo_Snap_Wednesday, March 14, 2018_20h58m56s_013_.png
    Mike Brown - Contact Me
    Programmatic Technologies, LLC
    Programmatic-Technologies.com
    Independent Developer & Consultant​​

    Comment


      #3
      Re: Message Box With Yes/No Buttons

      You might be interested in the following link: https://www.cssmatic.com/box-shadow
      Another favorite of mine is: http://www.colorzilla.com/gradient-editor/
      Another very useful site for styling and even adding in CSS animations to the box model: http://angrytools.com/css-generator/border/

      I like to use these websites to style the box model, play with ideas, etc. Pretty much all you have to do is toss this stuff into the code section of the container style, since it's CSS
      NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

      Comment


        #4
        Re: Message Box With Yes/No Buttons

        A5.msgBox.show is pretty good to start with... but in usual Alpha fashion it's only about half complete. The sample code here will get you started... but again, as usual, the sample code in the documentation is untested and wrong.

        https://www.alphasoftware.com/docume...w%20Method.xml

        Here's some sample code and sample css to go along with it. The css goes into the Local CSS Defintions section of the UX. The way A5.msgBox.show was created it's not really segregated enough so even though the css changes make the message box look ok... I'm not sure what ill effects they might have throughout an app. The changes to the message box are... rounded corners, button colors, font-size changes, close icon size change.

        A5MessageBox.PNG

        Code:
        var title = 'Save Before Closing?';
        var html = '<p>Do you wish to save your work before closing the window?</p>';
        var type = 'yn';
        var onClose = function (btn) {
            if (btn == 'yes') {
                // save their work then close the window
            } else if (btn == 'no') {
                // close the window
            } else {
                // cancel - do nothing
            }
        };
        
        A5.msgBox.buttons.yes = {html: 'Yes', className: 'msgbtnyes'};
        A5.msgBox.buttons.no = {html: 'No', className: 'msgbtnno'};
        
        A5.msgBox.show(title, html, type, onClose);
        Code:
        .msgbtnyes {
            border-radius: 10px;
        	font-size: 24px;
        	border: none;
            background-color:#12b886;
        	margin: 20px;
        	height: 60px;
        	width: 100px;
        }
        .msgbtnno {
            border-radius: 10px;
        	font-size: 24px;
        	border: none;
            background-color:#f00;
        	margin: 20px;
        	height: 60px;
        	width: 100px;
        }
        .window {
            border-radius: 10px;
        }
        .icon {
            width: 40px;
            height: 40px;
        }
        .windowTitle {
        	font-size: 14px;
        }
        .windowBody {
        	font-size: 18px;
        }
        Last edited by Davidk; 03-15-2018, 04:47 PM.

        Comment


          #5
          Re: Message Box With Yes/No Buttons

          Thanks, below is the CSS I have. The message box background is white and blending in with the backgroud of the app. I tried to put in the extra background code to change it to grey but it isnt working. Where do I need to put it to change it to grey?

          .msgbtnyes {
          border-radius: 10px;
          font-size: 24px;
          border: none;
          background:#12b886;
          margin: 20px;
          height: 60px;
          width: 100px;
          }
          .msgbtnno {
          border-radius: 10px;
          font-size: 24px;
          border: none;
          background:#f00;
          margin: 20px;
          height: 60px;
          width: 100px;
          }
          .window {
          background: #c9ccce;
          border-radius: 10px;
          }
          .icon {
          width: 40px;
          height: 40px;
          }
          .windowTitle {
          background: #c9ccce;
          font-size: 14px;
          }
          .windowBody {
          background: #c9ccce;
          font-size: 18px;
          }

          Comment


            #6
            Re: Message Box With Yes/No Buttons

            I would use background-color (I've changed my original post). It goes into .windowTitle, .windowBody, and add another class... .windowButtons. The A5 msgBox is divided into those 3 sections... but only do this if you want to use different colors for the 3 sections.

            Code:
            .windowTitle {
            	font-size: 14px;
            	background-color:#dee2e6;
            }
            .windowBody {
            	font-size: 18px;
            	background-color:#dee2e6;
            }
            .windowButtons {
            	background-color:#dee2e6;
            }
            To use just one background-color setting that will affect all 3 sections (the whole message window) use the .window class...

            Code:
            .window {
            	border-radius: 10px;
            	background-color:#dee2e6;
            }
            Last edited by Davidk; 03-15-2018, 04:48 PM.

            Comment


              #7
              Re: Message Box With Yes/No Buttons

              I added this below but the background color still blends in with the app which is a white background. Hence having hard time reading the text.

              .window {
              border-radius: 10px;
              background-color:#dee2e6;
              }

              Comment


                #8
                Re: Message Box With Yes/No Buttons

                Unsure... works ok here. You'd have to inspect the message in your browser... see if .window is the class being used for that message.

                A5Message2.PNG

                Post a simple UX with a single button calling the message method.
                Last edited by Davidk; 03-15-2018, 06:59 PM.

                Comment


                  #9
                  Re: Message Box With Yes/No Buttons

                  How do you use the message box that is built into alpha? The one like mikeallenbrown was talking about in this thread?

                  Comment


                    #10
                    Re: Message Box With Yes/No Buttons

                    It's the same message box. He's using the MobGray style in his UX... and a simple, unstyled, unchanged method...

                    Code:
                    A5.msgBox.show('Notice', 'This is a message box', 'yn');
                    Unsure why he didn't post any details.

                    Comment


                      #11
                      Re: Message Box With Yes/No Buttons

                      Sorry ...didn't post any details because he said, "I can create a message box but cant get it to look nice.". I took that to mean he already knew about alpha's built in message box but was dissatisfied.

                      For the business apps I've worked on the MobGray styled box does the job.
                      Mike Brown - Contact Me
                      Programmatic Technologies, LLC
                      Programmatic-Technologies.com
                      Independent Developer & Consultant​​

                      Comment


                        #12
                        Re: Message Box With Yes/No Buttons

                        I changed the style to IOS7 and it worked with the message box background. Thanks for your help!

                        Comment

                        Working...
                        X