Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 5 of 5

Thread: set.pos help!!

  1. #1
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351

    Star set.pos help!!

    does any one know how set the position of a button in the middle.

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    wndHandle = Application.GetWndHandle();
    windowSize = Window.GetSize(wndHandle);
    yourButtonSize = Button.GetSize("yourButtonName");
    Button.SetPos("yourButtonName", (windowSize.Width/2)-(yourButtonSize.Width/2), (widowSize.Height/2)-(yourButtonSize.Height/2));


    Good luck

    Yossi

  3. #3
    Join Date
    Dec 2003
    Posts
    891
    If you mean center the button in the middle of the AMS window, you can right click on the button, goto Align-click on to page-click center horizontal-click center verticle. This will do it in design time
    What yosik said will do it at runtime.

  4. #4
    Join Date
    Oct 2006
    Location
    London, UK
    Posts
    351

    Thumbs up

    thanks yosik!!

  5. #5
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    I have also done up an example that shows how to creat objects that "stay put" when you resize the window at run-time.

    This may be of interest as well, at some point:

    http://www.indigorose.com/forums/sho...light=stay+put
    Intrigued

Posting Permissions

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