• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Frame size

 
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Can anyone please tell me how to grab the height and width position of a frame.

I need access to the frame sizes so I can set the frame size to the same when the user comes back...

UPDATE: I have tried the following:

parent.myframe.width
parent.myframe.height
parent.myframe.cols
parent.myframe.rows

But alas they are all undefined
[ January 13, 2005: Message edited by: Nick Leaver ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You most likely need to use

offsetHeight
offsetWidth

Eric
 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
You most likely need to use

offsetHeight
offsetWidth

Eric



Hi Eric

Thanks for replying. The above are also undefined...

Just so I know I got my syntax correct I tried:

parent.myframe.offsetWidth;
parent.myfrane.offsetHeight;

Do you have any ideas?

Thanks for your help.
 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK I have found it. It is the innerWidth and innerHeight variables that hold the correct information.

For a frame:

parent.myFrame.innerWidth;
parent.myFrame.innerHeight;

For the main window from a frame;

parent.innerWidth;
parent.innerHeight;

Cheers
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic