Client width and height

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
wombats
Enthusiast
Enthusiast
Posts: 716
Joined: Thu Dec 29, 2011 5:03 pm

Client width and height

Post by wombats »

Could we please have functions to retrieve the client/inner width and height of gadgets and windows? This would be useful, for example, when using a container. We could easily size gadgets inside the container without having to worry about the border sizes, which can differ.

Maybe something like...

GadgetInnerWidth()
GadgetInnerHeight()
WindowInnerWidth()
WindowInnerHeight()

Thanks for considering this.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Client width and height

Post by IdeasVacuum »

Code: Select all

Width = WindowWidth(#Window) : Height = WindowHeight(#Window)
On Windows OS, that is the Window Client Area (inner area, i.e. excluding border/Title Bar)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Demivec
Addict
Addict
Posts: 4260
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: Client width and height

Post by Demivec »

wombats wrote:Could we please have functions to retrieve the client/inner width and height of gadgets and windows? This would be useful, for example, when using a container. We could easily size gadgets inside the container without having to worry about the border sizes, which can differ.
The PanelGaget and ScrollAreaGadget containers already allow retrieving the width and height of the client area. You have to use GetGadgetAttribute().
Post Reply