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

xdialog button color

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

    xdialog button color

    Hi,
    This is most likely going to end up in the wishlist forum but here goes.

    I would like to have gradient buttons on my xdialog form. That is all that is missing from being able to emulate a standard Alpha form currently in my scenario.

    A work-around is to place an image on the buttons, but would rather not for each and every button size I may have.

    Does anyone know of way to achieve this?...maybe an undocumented function or method?
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




    #2
    Re: xdialog button color

    Mike

    I am pretty sure that the button appearance on an xdialog and any windows message box is controlled by the appearance setting on the properties of the desktop. In XP properites, appearance, advanced, 3d objects.

    Alpha just uses that interface to produce its xdialog boxes so I don't know of any way to change the colors of the buttons in Alpha.

    I have been trying to do the same thing and have not been successfull

    FWIW

    Tom Baker

    Comment


      #3
      Re: xdialog button color

      Originally posted by MikeC View Post
      Hi,
      I would like to have gradient buttons on my xdialog form. That is all that is missing from being able to emulate a standard Alpha form currently in my scenario.

      Does anyone know of way to achieve this?...maybe an undocumented function or method?
      Perhaps this?

      From the help file on "What's new in V9", "New in Xdialog", "Stylesheets for Xdialog"

      Code:
      ui_modeless_dlg_box("foo",<<%dlg%
      {style}
      $Button {
      font:Arial,10,b;
      border-shape:large-rounded;
      fill-style:Gradient horizontal glass;
      fill-color:Light Blue;
      fill-accent-color:White;
      shadow-style:medium soft;
      }
      $Button:hover,$Button:focused {
      font:Arial,10,b;
      border-shape:large-rounded;
      line-style:single;
      line-width:1;
      line-color:Orange;
      fill-style:Gradient horizontal glass;
      fill-color:Orange;
      fill-accent-color:White;
      shadow-style:medium soft;
      }
      $Button:pressed {
      font:Arial,10,b;
      border-shape:large-rounded;
      line-style:single;
      line-width:1;
      line-color:Blue;
      fill-style:Gradient horizontal glass;
      fill-color:White;
      fill-accent-color:Blue;
      }
      $frame {
      fill-style:Gradient horizontal;
      fill-color:White;
      fill-accent-color:light Blue;
      shadow-style:thin soft;
      }
      $frame.caption {
      fill-style:Gradient horizontal;
      fill-color:White;
      fill-accent-color:light Blue;
      }
      $line {
      line-style:single;
      line-width:2;
      line-color:Light Blue;
      }
      {endstyle};
      This xdialog has styled frames, lines and buttons;
      {frame=3,6Hello World};
      First name:|[.40fname]|;
      Last name:|[.40lname];
      {line=2};
      {cellspillover=on}
      <One> <Two> <Three> <Four>;
      %dlg%)
      Jim Coltz
      Alpha Custom Database Solutions, LLC
      A5CustomSolutions.com
      [email protected]

      Comment


        #4
        Re: xdialog button color

        Thanks Jim! This helps and is a great start. Am wondering if buttons can have separate styles on the same xdialog? I will look at the code a bit closer but is not readily apparent that it can be done for individual buttons...
        Mike
        __________________________________________
        It is only when we forget all our learning that we begin to know.
        It's not what you look at that matters, it's what you see.
        Henry David Thoreau
        __________________________________________



        Comment


          #5
          Re: xdialog button color

          Unless I missed something, maybe in v10 for separate button styles with gradient. I can have solid colors for buttons that are different, but not quite the same....xdialog is sure getting close to what standard forms have for appearance now.
          Mike
          __________________________________________
          It is only when we forget all our learning that we begin to know.
          It's not what you look at that matters, it's what you see.
          Henry David Thoreau
          __________________________________________



          Comment


            #6
            Re: xdialog button color

            My thanks also Jim

            Ever since I read the post I have been playing with the buttons and frames on some of my dialog boxes, the new gradients really make for a more professional look.

            Again thanks again for pointing me in the right direction.

            Tom Baker

            Comment


              #7
              Re: xdialog button color

              Ditto - really appreciate that - put in a text file for future use
              Cole Custom Programming - Terrell, Texas
              972 524 8714
              [email protected]

              ____________________
              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

              Comment


                #8
                Re: xdialog button color

                can't get it to work in a dialog box that is not modeless (Version 8)

                here's code for a regular dialog box I've tried to use it in, unsuccessfully:

                Code:
                'Create an XDialog dialog box to prompt for parameters.
                DIM text1 as P
                dim text1.object as p 
                dim text1.class as c
                text1.class = "dhtmledit.dhtmledit"
                DIM SHARED whichone as C
                DIM SHARED varC_result as C
                DIM text1_html as c 
                text1_html = <<%html%
                <html>
                <head>
                <meta name="generator" content="Alpha Five HTML Editor">
                <title></title>
                <style>
                <!--
                p            { margin-top: 0; margin-bottom: 0 }
                -->
                </style>
                </head>
                <body>
                <p>Where two payments have been made for a single line item 
                (charge,) the original cannot be changed.&nbsp; You can <u><em>change</em></u> 
                the 2nd payment amount, or <u><em>delete</em></u>             
                            
                 the 2nd payment. </p>
                <p>&nbsp;</p>
                <p>If you delete the 2nd payment, then you can edit the first payment - so long as the the 
                first payment was made from the current check number. If it was not (most likely), then 
                after you delete the 2nd payment, [Edit Records] again and use the original check 
                number.</p>
                </body>
                </html>%html%
                ok_button_label = "Continue"
                cancel_button_label = "Cancel"
                varC_result = ui_dlg_box("Editing 2nd Payments",<<%dlg%
                {Background=#212+208+200}
                {startup=init}
                {region}
                | {activex=150,10text1?.f.};
                {region}:{endregion}|
                {region}(whichone:Change the Payment Amt for the 2nd Payment);
                (whichone:Delete the 2nd Payment);{endregion};
                ;
                {endregion};
                {line=1,0};
                {region}
                <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
                {endregion};
                %dlg%,<<%code%
                if a_dlg_button = "init" then 
                 a_dlg_button = ""
                 text1.object.browsemode = .t. 
                 text1.object.appearance = 1
                 text1.object.ScrollBars = .f.
                 on error goto text1_error
                 text1.object.documenthtml = text1_html
                 on error goto 0
                 text1.object.Refresh()
                 a_dlg_button = ""
                end if
                end 
                text1_error:
                ui_msg_box("Error","Invalid URL or HTML content.",UI_STOP_SYMBOL)
                end
                %code%)

                works in V9!!
                Last edited by martinwcole; 08-16-2009, 06:06 PM.
                Cole Custom Programming - Terrell, Texas
                972 524 8714
                [email protected]

                ____________________
                "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                Comment


                  #9
                  Re: xdialog button color

                  Martin

                  try this - see if this works

                  Code:
                  DIM text1 as P
                  dim text1.object as p 
                  dim text1.class as c
                  text1.class = "dhtmledit.dhtmledit"
                  DIM SHARED whichone as C
                  DIM SHARED varC_result as C
                  DIM text1_html as c 
                  text1_html = <<%html%
                  <html>
                  <head>
                  <meta name="generator" content="Alpha Five HTML Editor">
                  <title></title>
                  <style>
                  <!--
                  p            { margin-top: 0; margin-bottom: 0 }
                  -->
                  </style>
                  </head>
                  <body>
                  <p>Where two payments have been made for a single line item 
                  (charge,) the original cannot be changed.&nbsp; You can <u><em>change</em></u> 
                  the 2nd payment amount, or <u><em>delete</em></u>             
                              
                   the 2nd payment. </p>
                  <p>&nbsp;</p>
                  <p>If you delete the 2nd payment, then you can edit the first payment - so long as the the 
                  first payment was made from the current check number. If it was not (most likely), then 
                  after you delete the 2nd payment, [Edit Records] again and use the original check 
                  number.</p>
                  </body>
                  </html>%html%
                  ok_button_label = "Continue"
                  cancel_button_label = "Cancel"
                  varC_result = ui_dlg_box("Editing 2nd Payments",<<%dlg%
                  {Background=#212+208+200}
                  {startup=init}
                  [COLOR="Red"]
                  $Button {
                  		font:Arial,15,b;
                  		border-shape:SMALL-rounded;
                  		fill-style:Gradient Horizontal Top;
                  		fill-color:pale blue;
                  		fill-accent-color:white;
                  		}
                  	$Button:hover,$Button:focused {
                  		font:Arial,18,B;
                  		border-shape:small-rounded;
                  		line-style:single;
                  		line-width:1;
                  		line-color:blue;
                  		fill-style:Gradient horizontal;
                  		fill-color:light blue;
                  		fill-accent-color:White;}
                  		}
                  		{endstyle}   [/COLOR]
                  {region}
                  | {activex=150,10text1?.f.};
                  {region}:{endregion}|
                  {region}(whichone:Change the Payment Amt for the 2nd Payment);
                  (whichone:Delete the 2nd Payment);{endregion};
                  ;
                  {endregion};
                  {line=1,0};
                  {region}
                  <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
                  {endregion};
                  %dlg%,<<%code%
                  if a_dlg_button = "init" then 
                   a_dlg_button = ""
                   text1.object.browsemode = .t. 
                   text1.object.appearance = 1
                   text1.object.ScrollBars = .f.
                   on error goto text1_error
                   text1.object.documenthtml = text1_html
                   on error goto 0
                   text1.object.Refresh()
                   a_dlg_button = ""
                  end if
                  end 
                  text1_error:
                  ui_msg_box("Error","Invalid URL or HTML content.",UI_STOP_SYMBOL)
                  end
                  %code%)
                  It works for me in both v8 and v9


                  Tom Baker

                  Comment


                    #10
                    Re: xdialog button color

                    Misread---oops! Deleted most...

                    Works here as modal in both versions as well. Have not tried in v8 modeless yet.
                    Mike
                    __________________________________________
                    It is only when we forget all our learning that we begin to know.
                    It's not what you look at that matters, it's what you see.
                    Henry David Thoreau
                    __________________________________________



                    Comment


                      #11
                      Re: xdialog button color

                      Mike

                      I was going on what Martin has posted

                      can't get it to work in a dialog box that is not modeless (Version 8)
                      I don't think I am reading it wrong, but then again these old eyes don't work well sometimes. I thought that he meant that he could only get it to work on modal dialog boxes and then had a problem with the code he posted saying that he tried it unsucessfully in that code.

                      Maybe I am misreading the posting - I'll go back and read it a couple of more times - maybe it will sink into my thick head.:)

                      Tom

                      Comment


                        #12
                        Re: xdialog button color

                        in version 8 and 9 I used your code verbatim - didn't work - see alpha1 png
                        Cole Custom Programming - Terrell, Texas
                        972 524 8714
                        [email protected]

                        ____________________
                        "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                        Comment


                          #13
                          Re: xdialog button color

                          Martin

                          I left out a piece of the code

                          before $button

                          place {style}

                          I can see by you thumbnail that the {style} was missing.

                          Sorry

                          Tom

                          Comment


                            #14
                            Re: xdialog button color

                            Martin

                            Here is the corrected code

                            Code:
                            'Date Created: 16-Aug-2009 06:11:01 PM
                            'Last Updated: 16-Aug-2009 06:19:03 PM
                            'Created By  : Tom Baker
                            'Updated By  : Tom Baker
                            'Create an XDialog dialog box to prompt for parameters.
                            DIM text1 as P
                            dim text1.object as p 
                            dim text1.class as c
                            text1.class = "dhtmledit.dhtmledit"
                            DIM SHARED whichone as C
                            DIM SHARED varC_result as C
                            DIM text1_html as c 
                            text1_html = <<%html%
                            <html>
                            <head>
                            <meta name="generator" content="Alpha Five HTML Editor">
                            <title></title>
                            <style>
                            <!--
                            p            { margin-top: 0; margin-bottom: 0 }
                            -->
                            </style>
                            </head>
                            <body>
                            <p>Where two payments have been made for a single line item 
                            (charge,) the original cannot be changed.&nbsp; You can <u><em>change</em></u> 
                            the 2nd payment amount, or <u><em>delete</em></u>             
                                        
                             the 2nd payment. </p>
                            <p>&nbsp;</p>
                            <p>If you delete the 2nd payment, then you can edit the first payment - so long as the the 
                            first payment was made from the current check number. If it was not (most likely), then 
                            after you delete the 2nd payment, [Edit Records] again and use the original check 
                            number.</p>
                            </body>
                            </html>%html%
                            ok_button_label = "Continue"
                            cancel_button_label = "Cancel"
                            varC_result = ui_dlg_box("Editing 2nd Payments",<<%dlg%
                            {Background=#212+208+200}
                            {startup=init}
                            [COLOR="Red"]{style}
                            $Button {
                            		font:Arial,15,b;
                            		border-shape:SMALL-rounded;
                            		fill-style:Gradient Horizontal Top;
                            		fill-color:pale blue;
                            		fill-accent-color:white;
                            		}
                            	$Button:hover,$Button:focused {
                            		font:Arial,18,B;
                            		border-shape:small-rounded;
                            		line-style:single;
                            		line-width:1;
                            		line-color:blue;
                            		fill-style:Gradient horizontal;
                            		fill-color:light blue;
                            		fill-accent-color:White;}
                            		}
                            		$frame {
                            		fill-style:Gradient horizontal;
                            		fill-color:White;
                            		fill-accent-color:light Blue;
                            		}
                            	$line {
                            		line-style:single;
                            		line-width:2;
                            		line-color:DARK Blue;
                            		}
                            		{endstyle}   [/COLOR]
                            {region}
                            | {activex=150,10text1?.f.};
                            {region};{endregion}|
                            {region}(whichone:Change the Payment Amt for the 2nd Payment);
                            (whichone:Delete the 2nd Payment);{endregion};
                            ;
                            {endregion};
                            {line=1,0};
                            {region}
                            <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
                            {endregion};
                            %dlg%,<<%code%
                            if a_dlg_button = "init" then 
                             a_dlg_button = ""
                             text1.object.browsemode = .t. 
                             text1.object.appearance = 1
                             text1.object.ScrollBars = .f.
                             on error goto text1_error
                             text1.object.documenthtml = text1_html
                             on error goto 0
                             text1.object.Refresh()
                             a_dlg_button = ""
                            end if
                            end 
                            text1_error:
                            ui_msg_box("Error","Invalid URL or HTML content.",UI_STOP_SYMBOL)
                            end
                            %code%)
                            Tom

                            Comment


                              #15
                              Re: xdialog button color

                              works perfect in 9, works in 8 but doesn't change the button colors - may be because I am running in a very early version (3088) of 8 due to changes they made in later versions that caused V7 code that had worked to stop working
                              Cole Custom Programming - Terrell, Texas
                              972 524 8714
                              [email protected]

                              ____________________
                              "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

                              Comment

                              Working...
                              X