Alpha Video Training
Results 1 to 6 of 6

Thread: Button Control in xdialog

  1. #1
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,077

    Default Button Control in xdialog

    I am always wondering how to control the buttons whenever I used the xDialog. I want to create once and manipulate it with other xDialogs instead of copy and paste.

    I made this button control with Owner Draw in the xdialog. You can define the Buttons with image, font, focus and event name in once. It can be apply in the many xdialog forms.

    See enclosed the zip file.
    Buttons.zip

    only the remained problem is I am not able to shorten of this (red ink)
    {%O={@@};OF={J=C,C}{C=Blue}{F=Tahoma,9,B}{B=Light Tan}{I:'$$Generic.edit.Save'} Save & New ... %} ,

    something like
    BttnHighLabel = "{{J=C,C}{C=Blue}{F=Tahoma,9,B}{B=Light Tan}{I:'$$Generic.edit.Save'}" Save & New ...

    {%O={@@};OF={@@} % =SaveBttnLabel ;=BttnHighLabel} .

    May be someone knows how to shorten of this Button focus control.

  2. #2
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,686

    Default Re: Button Control in xdialog

    I hope those aren't real SSN on the Employee Report...
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  3. #3
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,077

    Default Re: Button Control in xdialog

    Robin,

    It is not. I used the Alpha Sample table.

  4. #4
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,686

    Default Re: Button Control in xdialog

    I tried your sample: changing the zipcode with the edit button did not save the change to the record.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  5. #5
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,077

    Default Re: Button Control in xdialog

    Robin,

    Sorry.
    The sample does not have "Save or change" event commands. You have to create the events. My intention is only shown the button control issue.

  6. #6
    "Certified" Alphaholic
    Real Name
    John Koh
    Join Date
    Jan 2004
    Location
    Maryland, USA
    Posts
    1,077

    Default Re: Button Control in xdialog

    Robin,

    I changed the Button Condition and Looks better than before and cleaner on the code.

    {region}{justify=right}
    {condition=vShowBttn="New"}
    {region=a}
    <%O={@@};OF={J=C,C}{C=Blue}{F=Tahoma,9,B}{B=Light Tan}{I:'$$Generic.edit.Save'} Save & New ... %25=NewBttnLabel!OK?vSaveflag>
    {endregion} 'No Semi colon(;) and moved out two buttons
    {condition=.t.}
    <%O={@@};OF={J=C,C}{C=Blue}{F=Tahoma,9,B}{B=Light Tan}{I:'$$file.save'} Save & Close ... %25=SaveBttnLabel!Save?vSaveFlag>
    {sp=2}<%O={@@};OF={J=C,C}{C=Blue}{F=Tahoma,9,B}{B=Light Tan}{I:'$$Generic.edit.Cancel'} Cancel ... %25=CancelBttnLabel!Cancel>;
    {endregion};
    address_test.jpg

Similar Threads

  1. Javascript help: how to hide a control depending on a value in a radio-button control
    By WindForce in forum Application Server Version 11 - Web/Browser Applications
    Replies: 2
    Last Post: 05-10-2012, 07:42 AM
  2. xdialog control hiding
    By Clunes in forum Alpha Five Version 10 - Desktop Applications
    Replies: 4
    Last Post: 06-08-2010, 01:04 AM
  3. Hide xdialog control
    By Bill Parker in forum Alpha Five Version 6
    Replies: 4
    Last Post: 04-28-2006, 05:24 PM
  4. XDialog Box Control
    By alexmuir in forum Alpha Five Version 5
    Replies: 2
    Last Post: 12-20-2005, 05:40 PM
  5. in xdialog give focus to a control with a button?
    By Daniel Weiss in forum Alpha Five Version 5
    Replies: 3
    Last Post: 11-19-2002, 04:45 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
  •