Results 1 to 8 of 8

Thread: Anything like defaultTop and defaultLeft??

  1. #1
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Anything like defaultTop and defaultLeft??

    Hi all,
    Does anyone know if there is any function that store the default top and default left coordinates of any element?? I mean that if any object has been moved dynamically from 8,8 to 300,300 by pressing a button and there is another button named "set to default" then how can I send the element back to 8,8?? Is there anything functions like defaultTop and defaultLeft?? Any help would be greatly appreciated.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Store the top and left before you move it.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am already using a drag and drop.

  4. #4
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by shachi
    Any help would be greatly appreciated.
    Attaching my happy creativity: use what you like- PD

  5. #5
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ItsMeOnly: You've attached the script(Thank you for that) but you did not tell me how or what to use.

  6. #6
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    there are moveWin functions, resize*, minimize, and maximize that can solve your problems. I'm building set of associative arrays that are being updated with dimensions as the actions are taken, with a little of rewriting, you could use it for "setting default" (check minimize and maximize :: (maximized[] = 0)) and "restoring default" check (maximize :: (maximized[] = 1)) position (AND dimensions!)

  7. #7
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ItsMeOnly: May be you didn't get my point but my query has nothing to do with window object.

  8. #8
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    a "window" here is nothing but "any object (that) has been moved dynamically"

    you're given a set of functions to move it, store its position and dimensions, even track size of child elements if they would overflow after its size would have changed

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
  •