Alpha Video Training
Results 1 to 9 of 9

Thread: Browse Window position

  1. #1
    Member
    Real Name
    David Cowling
    Join Date
    May 2007
    Location
    Surrey, England
    Posts
    11

    Default Browse Window position

    A5V8 - I have a simple 3 column browse. I have not given it a companion form. I want the browse to be tall and thin but every time I change it in design mode it reverts to what appears to be a default size and position. What am I doing wrong.

    David C

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

    Default Re: Browse Window position

    Hi Dave,
    I don't think you are doing anything wrong, this seems to be the default behavior of a stand alone browse. Try embedding the browse in a form and have it fill the space, then you can control its position and a lot more!
    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 Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,785

    Default Re: Browse Window position

    In the OnInit of the browse place
    Code:
    this.width = 200
    change the 200 to what ever width suits.
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  4. #4
    Member
    Real Name
    David Cowling
    Join Date
    May 2007
    Location
    Surrey, England
    Posts
    11

    Default Re: Browse Window position

    Thanks.

    I'm not too good with xbasic so I'll go for the embedded browse

    David C

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

    Default Re: Browse Window position

    Quote Originally Posted by Tim Kiebert View Post
    In the OnInit of the browse place
    Code:
    this.width = 200
    change the 200 to what ever width suits.
    Hi Tim,
    Is there a conversion table somewhere that tells you how many pixels are in an inch? Alpha offers an option when setting the form's size but then the xbasic wants pixels. It would be good to know this...

    Edit:
    Found an online converter (there are 96 pixels per inch)

    http://www.classical-webdesigns.co.u...chconvert.html
    Last edited by MoGrace; 05-30-2008 at 12:37 PM.
    Robin

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

  6. #6
    VAR csda1's Avatar
    Real Name
    Ira J Perlow
    Join Date
    Apr 2000
    Location
    Boston, Massachusetts, USA
    Posts
    3,530

    Default Re: Browse Window position

    Hi Robin,

    While the value of most PC screens is 96 pixels per inch, this is not always the case. You should use the function ui_info() to get the numbers required and change as needed for other functions with the correct expression. See help on ui_info() for argument values and their returns.
    Regards,

    Ira J. Perlow
    Computer Systems Design


    CSDA A5 Products
    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
    CSDA Barcode Functions

    CSDA Code Utility
    CSDA Screen Capture



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

    Default Re: Browse Window position

    Thank you Ira.
    Robin

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

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

    Default Re: Browse Window position

    Tim,
    I tried your suggestion and at first it didn't seem to work. Adding a this.repaint() after the height and width settings however did the trick.

    In the OnInit event for the browse:

    this.window_position("left","top")
    this.height = 462 'pixels
    this.width = 455
    this.repaint()

    I also went into the object explorer and set these same property values, but they didn't "stick" there.
    Robin

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

  9. #9
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,785

    Default Re: Browse Window position

    Hi Robin,

    Glad you got it working. I just tried your code here using V7 (That is your current version, yes?) and it seems to work with out the repaint <shrug>. I think the reason the object explorer (while in design mode) doesn't stick is probably the same as why the properties setting doesn't stick. The code in the oninit basically mimmicks going to the object explorer in view mode.
    Tim Kiebert
    Eagle Creek Citrus
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

Similar Threads

  1. Position of Lookup Window
    By dchiass in forum Application Server Version 8
    Replies: 2
    Last Post: 02-05-2008, 07:06 PM
  2. Window Position on Startup
    By Tom Mills in forum Alpha Five Version 6
    Replies: 2
    Last Post: 01-03-2005, 11:28 AM
  3. window position
    By julian lewis in forum Alpha Five Version 6
    Replies: 2
    Last Post: 07-28-2004, 08:14 AM
  4. Bug in position window?
    By russ Boehle in forum Alpha Five Version 5
    Replies: 13
    Last Post: 09-08-2002, 07:28 AM
  5. Window Position
    By tlyon in forum Alpha Five Version 4
    Replies: 0
    Last Post: 07-22-2000, 08:33 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
  •