Alpha Video Training
Results 1 to 28 of 28

Thread: xdialog "postion" command

  1. #1
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default xdialog "postion" command

    I am struggling to find way to making sure i can control
    the position of a dialog form, meaning when it pop up
    i want it to be say 1" from left and 1" from top

    instaed of default in the middle,

    {position = +1,-1} is how i interpret the command list
    but i trust i am not applying it properly

    can someone give me some hint,
    thanks

    ken tjia

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

    Default Re: xdialog "postion" command

    {position = +1,-1}

    Hi Ken,

    What happens if you get rid of the spaces on each side of the "="?

    {position=+1,-1}
    Bill Hanigsberg

  3. #3
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    i want it to be say 1" from left and 1" from top
    {position=1,1}

  4. #4
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    well i kept getting error message
    "invalid date constant"

  5. #5
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    "invalid date constant"
    That has nothing to do with the position. You have a variable or an expression that is invalid.

  6. #6
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    HI Bill, i tried with or without = sign
    i tried, with +1, -1 or -1,+1

    all comes up with invalid date constant

    now, i am sure there are user out there wish to control the position of the xdialog box or in my case ADO xdailog, just want it start at the left and top

    i placed the codes right at the beginning of the scrip,

    ken tjia

  7. #7
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by G Gabriel View Post
    That has nothing to do with the position. You have a variable or an expression that is invalid.
    yes, but if i took this code out, everything work fine

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

    Default Re: xdialog "postion" command

    ken,

    Show us the script.
    Bill Hanigsberg

  9. #9
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by ktjia@ampmservice.com View Post
    yes, but if i took this code out, everything work fine
    ok, i created a simple dialog, prompt for something
    converted the code to xbasic, add this position {position= -1,+1}
    i get the same error, now i placed it right at the beginning.

    try one yourself, simple dialog and add this position code

  10. #10
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by whanigsberg View Post
    ken,

    Show us the script.
    'Create an XDialog dialog box to prompt for parameters.
    {position= -1,+1}
    DIM SHARED sql1 as C
    DIM SHARED varC_result as C
    heading_string = "lllll"
    footer_string = "oot"
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    varC_result = ui_dlg_box("kkkk",<<%dlg%
    {region}
    {text=55,1:heading_string};
    {endregion};
    {region}
    Type prompt here:| [.40sql1];
    {endregion};
    {region}
    {text=55,1:footer_string};
    {endregion};
    {line=1,0};
    {region}
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%)

  11. #11
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    yes, but if i took this code out, everything work fine
    you must have put {position} in the wrong spot.

  12. #12
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    I entered my last reply before I saw your code, and sure enough you put it in the wrong spot.
    Now try:
    Code:
    'Create an XDialog dialog box to prompt for parameters.
    
    DIM SHARED sql1 as C
    DIM SHARED varC_result as C
    heading_string = "lllll"
    footer_string = "oot"
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    varC_result = ui_dlg_box("kkkk",<<%dlg%
    {position= -1,+1}
    {region}
    {text=55,1:heading_string};
    {endregion};
    {region}
    Type prompt here:| [.40sql1];
    {endregion};
    {region}
    {text=55,1:footer_string};
    {endregion};
    {line=1,0};
    {region}
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%)
    The way you had it, made absolutly no sense to alpha for several reasons:
    the curly paraenthis usually denote a date (or an xdlg command} and what you have between them does not look like neither.
    Last edited by G Gabriel; 02-28-2007 at 12:28 PM.

  13. #13
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    ..and what is with that "kkkk"?
    Is that a more restictive branch of the "KKK"?

  14. #14
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by G Gabriel View Post
    ..and what is with that "kkkk"?
    Is that a more restictive branch of the "KKK"?
    well, not yet, the error is gone, i am still trying to move the form.
    the kkk is my name "ken,kian khiang Tjia" hi

    will comment back shortly

  15. #15
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by ktjia@ampmservice.com View Post
    well, not yet, the error is gone, i am still trying to move the form.
    the kkk is my name "ken,kian khiang Tjia" hi

    will comment back shortly
    well, not satisfy with this position code, i put -1,+1
    also -3,+3

    it does not move the xdialog form at all?
    try zero,zero same thing, can you move yours?

  16. #16
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    I was only kidding about the "KKKK".
    I am going to make a guess: you don't live in the US.

  17. #17
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by ktjia@ampmservice.com View Post
    well, not satisfy with this position code, i put -1,+1
    also -3,+3

    it does not move the xdialog form at all?
    try zero,zero same thing, can you move yours?
    dim AdoForm.dialog_template as c
    'The dialog_template is Xdialog psuedo code showing placeholders for all of the controls on dialog box.
    AdoForm.dialog_template = <<%dlg%
    {position = +0,-0}
    {Startup=Init}

    {Region};
    {region_ymargin=2}
    {region_xmargin=2}
    {HeadingStart}
    ~DataObj1.SERVICE_NO_label~|~DataObj1.NAME_label~|~DataObj1.CITY_label~|~DataObj1.PROVINCE_label~
    {HeadingEnd}
    {RepeatRegionStart}

    {region_ymargin=}
    {region_xmargin=}
    {region}~DataObj1.SERVICE_NO~{endregion}|{region}~DataObj1.NAME~{endregion}|{region}~DataObj1.CITY~{endregion}|{region}~DataObj1.PROVINCE~{endregion}
    {RepeatRegionEnd}
    {Endregion};

    the above is the partial code(s) .....

  18. #18
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    well, not satisfy with this position code, i put -1,+1
    also -3,+3
    The negative numbers will take the xdlg off the screen. No need for "+" or "-" since you cannot have negatives.
    The 0,0 position will put it at the left-most upper corner of your screen. Start from there and choose the desired position.
    Last edited by G Gabriel; 02-28-2007 at 12:29 PM.

  19. #19
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by G Gabriel View Post
    The negative numbers will take the xdlg off the screen. No need for "+" or "-" since you cannot have negatives.
    The 0,0 position will put it at the left-most upper corner of your screen. Start from there and choose the desired position.
    yes, i also confirm such code work accordingly, now i am back to my basic ADO dialog, unfortunately it is still not able to move it, remain in the center of the display/

    The attached simply a converted ado_dialog, i place the position right after or before the region, not making any different.

    so there got to be something that preventing it from moving

    ken tjia

  20. #20
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    ken:
    You lost me!
    Are you openeing a fom? or an xdlg?

  21. #21
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by G Gabriel View Post
    ken:
    You lost me!
    Are you openeing a fom? or an xdlg?
    Well, you got me,

    I started with Genie,

    * Xdialog Window
    * create "display xdialog Form based on ADO/ODBC data

    this form or dialog form, finally showing the data that i want
    i managed to alter few thing, however i need this form to be
    perfectly lined up on the left side, not middle of the screen/

    so i play with the {position} command, in hope to achieve
    the attachement above was the set of codes generated by
    the genie/

  22. #22
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    i need this form to be perfectly lined up on the left side
    If you are opening a form as an xdlg, go to the form in design mode, check the Window and place it where you want it to be and save the form.

    I have to leave now as I have important business to attend to.. I will get with you later.

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

    Default Re: xdialog "postion" command

    AdoForm.dialog_template = <<%dlg%
    {position = 4,4}
    {Startup=Init}
    etc
    What if you do this?
    Bill Hanigsberg

  24. #24
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by whanigsberg View Post
    What if you do this?
    absolutely not making any different

  25. #25
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,212

    Default Re: xdialog "postion" command

    Ken,
    You said earlier that 'you didn't like the position of it. Maybe it is time you posted a screenshot of what you are seeing so we can see it to. Form opened as Xdialog or Xdialog?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  26. #26
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by Mike Wilson View Post
    Ken,
    You said earlier that 'you didn't like the position of it. Maybe it is time you posted a screenshot of what you are seeing so we can see it to. Form opened as Xdialog or Xdialog?
    yes, this is the look of the screen, staying in the middle of the form

  27. #27
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,204

    Default Re: xdialog "postion" command

    I started with Genie,

    * Xdialog Window
    * create "display xdialog Form based on ADO/ODBC data
    What Genie? from where?

    Never mind..I found the Genie you are talking about and it's supposed to display Access files or other external DB.

    I don't have Access (or I might have it and don't know) so I am not able to do any testings. I will see if I could come up with something..
    Last edited by G Gabriel; 02-28-2007 at 06:51 PM.

  28. #28
    Member
    Real Name
    ken tjia
    Join Date
    Jan 2006
    Posts
    110

    Default Re: xdialog "postion" command

    Quote Originally Posted by G Gabriel View Post
    What Genie? from where?

    Never mind..I found the Genie you are talking about and it's supposed to display Access files.

    I don't have Access (or I might have it and don't know) so I am not able to do any testings. I will see if I could come up with something..

Similar Threads

  1. topparent.command("RECORD_COMMIT") does not raise error
    By atchut in forum Alpha Five Version 6
    Replies: 7
    Last Post: 02-08-2006, 07:10 PM
  2. XDialog "hiding"/scrolling first character
    By Lawrence Fox in forum Alpha Five Version 7
    Replies: 2
    Last Post: 01-15-2006, 11:59 PM
  3. Command "waitkey" available ?
    By BDennis in forum Alpha Five Version 4
    Replies: 3
    Last Post: 11-22-2003, 09:53 AM
  4. "Command" question
    By Blake in forum Alpha Five Version 5
    Replies: 0
    Last Post: 01-25-2003, 11:33 AM
  5. "SCRIPT_SPAWN()" COMMAND
    By RALPH WHALEY in forum Alpha Five Version 4
    Replies: 0
    Last Post: 06-07-2000, 08:11 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
  •