Alpha DevCon 2018
Results 1 to 6 of 6

Thread: xDialog button align

  1. #1
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,918

    Default xDialog button align

    Sure seems that most of my questions here end up being ones regarding xDialog! :-)

    I want to align different height buttons centered horizontally.

    Example:

    Code:
    result=ui_dlg_box("Title",<<%dlg%
    {font=Arial,10}
    {region}
    Enter your firstname, last name and occupation: ;
    {endregion};
    {region}
    {justify=right}First Name: |{justify=left} .20firstname;
    {justify=right}Last Name: |{justify=left} .20lastname;
    {justify=right}Job: |{justify=left} .30occupation;
    {endregion};
    {region}
    <&OK> {font=Arial,7}<12,0.1"Cancel>;
    {endregion};
    {font=Arial,10}
    %dlg% )
    I want the Cancel button to be centered by height to the OK button.

    Any ideas? I have tried {region}, {lf=}, {Row} and {Col} to no avail. The {Justify=} is only for labels/text I found with no analogous command for doing the same for the controls in an xDialog.

    Although the example is with two buttons, I am actually trying to center vertically a series of radio buttons with a normal button but the same solution I am sure will work for both and other cases as well.

    Am hoping someone has wanted to do what I am asking and is simple (right! lol).
    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. #2
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,056

    Default Re: xDialog button align

    Like this perhaps?
    {lf=} and {sp=} might do it
    Edit.
    Nope, I misread the intent. Doesn't seem to be an incremental {lf=}
    Any reason the buttons can't all be the same size?

    Edit again. A shower moment!
    One of my apps has a logical view of the tables, menus and processes. This is built in Visio, and saved as a.png.
    Clicking on a HotSpot which overlays the different components, carries out the appropriate action.
    It works a bit like Xdialog and you can overlay fields on the .png image.
    That way you can design whatever size shape or orientation of buttons as you wish.
    I haven't tried putting it in an xdialog region, but it could be possible.
    Attached Images Attached Images
    Last edited by Ted Giles; 09-14-2018 at 06:03 AM.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/
    See our site for Alpha Support, Conversion and Upgrade.

  3. #3
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,918

    Default Re: xDialog button align

    Thanks Ted. I should have placed the radio buttons into the example as it then shows the disproportionate heights of the radio compared to the button height required to make the two controls centered when placed on the same line. The reason for the small button was to make the entire line a bit more unobtrusive for choices that are right above a large button.

    I was hoping that I simply missed a way to do this in xdialog. And you are right on when thinking to use the {lf=} incrementally as that was the very first thought I had as well...there have been many times I have wanted to use such a missing feature and figured it was time to ask the message board.

    What I will do if no one has a simple way is in the attached image...the button is a bit larger than wanted and not quite centered but doesn't look too bad. The button is the "Make Default" button to the right of the Excel, PDF, Both radio controls. Another place I would like to be able to do this is for the Import button located on the bottom left of the xdialog. Other reasons for making a button smaller is a form's real estate as you will notice other small buttons which, if larger, just would not look right and make the height of the form even larger.

    Thanks for responding...utilizing an image with a hotspot could be doable by creating a transparent image with the correct alignment I guess but then it would present other aspects that would be inconsistent with other buttons that would have to be dealt with (onflyover, cursor changing, ...).



    AlphaMessageBoard_xDialog.jpg
    Last edited by MikeC; 09-14-2018 at 08:42 AM.
    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
    __________________________________________




  4. #4
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,107

    Default Re: xDialog button align

    I think you might be able to do something with columns and rows.

    OK button in column 1, just one row. Cancel button in column 2, row 2 of 3.


    Image 4.png

    Seems like a lot of work.
    Last edited by Stan Mathews; 09-14-2018 at 11:30 AM.
    There can be only one.

  5. #5
    "Certified" Alphaholic Ted Giles's Avatar
    Real Name
    Ted Giles
    Join Date
    Aug 2000
    Location
    In the Wolds, Louth, Lincolnshire, UK
    Posts
    4,056

    Default Re: xDialog button align

    I think it looks PDG as it is Mike.
    Correct Stan, not just this time, but maintenance and customer changes become a nightmare.
    Ted Giles
    Example Consulting - UK
    .

    https://exampleltd.example-software.com/
    See our site for Alpha Support, Conversion and Upgrade.

  6. #6
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,918

    Default Re: xDialog button align

    Thank you Stan. I had tried both Col and row....but not together! I have found xdialog to be a lot of work to obtain good aesthetics, especially compared to regular forms. But once a method is known (thanks again!), it really is not hard or very time consuming. I like the portability of xdialog and in some cases I have found them to be necessary as a regular form has caused issues when dealing with multiple QuickBooks refreshes.
    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
    __________________________________________




Similar Threads

  1. Right align numbers in xdialog list
    By Peter.Greulich in forum Alpha Five Version 11 - Desktop Applications
    Replies: 12
    Last Post: 07-10-2016, 07:45 PM
  2. Dialog Button Align Right
    By totallycovered in forum Application Server Version 11 - Web/Browser Applications
    Replies: 7
    Last Post: 02-02-2013, 10:59 AM
  3. Action button align right
    By Peter.Greulich in forum Application Server Version 10 - Web/Browser Applications
    Replies: 7
    Last Post: 03-23-2011, 08:50 AM
  4. Left align the Submit button
    By Jberry in forum Archived Wishlist
    Replies: 2
    Last Post: 07-22-2010, 06:19 PM
  5. Right Align labels in xdialog
    By Mark Pearson in forum Alpha Five Version 9 - Desktop Applications
    Replies: 7
    Last Post: 08-07-2009, 10:04 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •