Alpha Video Training
Results 1 to 12 of 12

Thread: Popup titles

  1. #1
    Jeff Moses
    Guest

    Default Popup titles

    Anyone know if there is a way when using a "popup" form to change or stop the Alpha Five heading from showing up on the title bar when closing the window and saving the record?
    Jeff

  2. #2
    Brenden Cobb
    Guest

    Default RE: Popup titles

    Jeff-

    Sorry, can you be a little more desciptive about what you want to do?

    Maybe attach an example form or image and describe which part you want to exclude.

    Thanks,
    Brenden

  3. #3
    "Certified" Alphaholic Scott Emerick's Avatar
    Real Name
    Scott Emerick
    Join Date
    Dec 2000
    Location
    Central Virginia/ North Carolina Border
    Posts
    2,154

    Default RE: Popup titles

    Jeff,

    If its a form you create then you can set the title in the form properties on the window tab enter the name you want in the "Caption" field.

    If you are talking about pop ups that are built into alpha, for example, deleting a record with ctrl-d, then the answer is to create your own dialog box with xbasic.

    Here is a example of a delete button on a form:

    'Displays a message box (style:'Yes, No Buttons', image: 'Attention symbol', id: 'delete').
    DIM SHARED delete_result as N
    DIM SHARED delete_YES_Button as L
    DIM SHARED delete_NO_Button as L
    delete_YES_Button = .F.
    delete_NO_Button = .F.

    title_var = "Delete Record" '*** This is the popup title
    message_text_var =

  4. #4
    Jeff Moses
    Guest

    Default RE: Popup titles

    Brenden,
    Attached is a screen shot of the message box. To generate this box I entered a new record via a table lookup field. I have one of my forms selected as the entry form in the lookup rules in field rules. After finsihing the data entry and closing the form this message box appears.
    Thanks,
    Jeff

  5. #5
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default RE: Popup titles

    Scott,

    That's kinda nice. Did the genie produce it or did you do the knitting?

    Bill

  6. #6
    "Certified" Alphaholic Scott Emerick's Avatar
    Real Name
    Scott Emerick
    Join Date
    Dec 2000
    Location
    Central Virginia/ North Carolina Border
    Posts
    2,154

    Default RE: Popup titles

    William,

    Its half and half. Why not genie if you can :)

  7. #7
    Jeff Moses
    Guest

    Default RE: Popup titles

    Hi Scott,
    The message box I'm getting is when my form is closing. Try doing a table lookup on a lookup field and use the "ENTER" option in the lookup itself. When you are finished entering the data try to close the window. That's when you see the message. Look at the attachment I posted up a couple posts.
    Jeff

  8. #8
    Jeff Moses
    Guest

    Default RE: Popup titles

    Brendon,
    Have you had a chance to look at this? I have supplied an example.
    Jeff

  9. #9
    "Certified" Alphaholic Scott Emerick's Avatar
    Real Name
    Scott Emerick
    Join Date
    Dec 2000
    Location
    Central Virginia/ North Carolina Border
    Posts
    2,154

    Default RE: Popup titles

    Jeff,

    The message box you are seeing is caused by you trying to close the form while it is still in enter or change mode.
    Just make sure the record is in view mode before the window is closed and you will not get that message.

    If you want the message, but customized then make your own and attach it to the CanExit event of the form.

    Sorry I misunderstood earlier.

    Scott

  10. #10
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,305

    Default RE: Popup titles

    jeff

    the events that you want are the "asksaveevent" and the "asksavechange".

    these events allow you to overwride the a5 system dialogs.

    i'll attach the section from the xbasic ref manual to the next message

  11. #11
    Alpha Software Employee Selwyn Rabins's Avatar
    Real Name
    Selwyn Rabins
    Join Date
    Mar 2000
    Location
    Boston, MA
    Posts
    5,305

    Default RE: Popup titles







    New Page 1







    AskSaveChange and AskSaveEnter Events
    The AskSaveChange and AskSaveEnter events fire when the user
    attempts to close a form before committing changes to a new or edited record.
    They allow the user to custom design the dialog that Alpha Five displays asking
    the user to confirm the action. XE "AskSaveChange event"
    XE "AskSaveEnter event"
    Result_code Variable
    Result_code is a system variable that is used in conjunction
    with the AskSaveChange and AskSaveEnter events. For example, if the result_code
    variable is set to ui_yes_selected, then the record is saved, and Alpha Five
    does not present its dialog asking the user for confirmation. If you do not
    define a script for either the AskSaveChange, or AskSaveEnter event, or do not
    set the numeric result_code, then the default Alpha Five dialog appears.
    Examples:
    Change the wording on the dialog to something specific to the
    application:
    result_code = ui_msg_box("Warning","Save invoice change in
    SYMBOL 195 \f "Wingdings"
    progress",UI_YES_NO_CANCEL)

    Change the meaning of Yes from “save” to “abort”:
    result_code = ui_msg_box("warning","lose change(s)",
    SYMBOL 195 \f "Wingdings"
    UI_YES_NO_CANCEL)
    if result_code = UI_YES_SELECTED then
    result_code = UI_NO_SELECTED
    else if result_code = UI_NO_SELECTED
    result_code = UI_YES_SELECTED
    end if

    Automatically save the record (i.e. don't ask for confirmation)

    result_code = UI_YES_SELECTED





  12. #12
    Jeff Moses
    Guest

    Default RE: Popup titles

    Thanks Selwyn,
    Jeff

Similar Threads

  1. The, An, A in titles
    By urbanski in forum Code Archive
    Replies: 3
    Last Post: 05-31-2005, 01:58 PM
  2. Form titles behaving badly
    By Jim Litzie in forum Alpha Five Version 6
    Replies: 9
    Last Post: 10-26-2004, 07:50 PM
  3. fields and field titles
    By dik_coleman in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-15-2003, 08:58 PM
  4. fields and field titles
    By dik_coleman in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-12-2003, 09:40 AM
  5. Window Titles
    By Jeff, Richards in forum Alpha Five Version 5
    Replies: 9
    Last Post: 11-30-2003, 12:26 PM

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
  •