GetGadgetSize()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

GetGadgetSize()

Post by IdeasVacuum »

We currently have GadgetX(), GadgetY(), GadgetHeight() and GadgetWidth() functions and they great. However, rather like ResizeGadget(), there are times when an all-in-one function would be more elegant: GetGadgetSize(x,y,w,h).
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
STARGÅTE
Addict
Addict
Posts: 2227
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: GetGadgetSize()

Post by STARGÅTE »

GetGadgetSize(x,y,w,h) ?

you will get gadget sizes but you will use parameters x,y,w,h ?
don't understand.

you mean: ?

Code: Select all

Procedure GetGadgetSize(Gadget.i, *X.Integer, *Y.Integer, *Width.Integer, *Height.Integer)
	*X\i = GadgetX(Gadget)
	*Y\i = GadgetY(Gadget)
	*Width\i = GadgetWidth(Gadget)
	*Height\i = GadgetHeight(Gadget)
EndProcedure

GetGadgetSize(#Gadget, @ResultX, @ResultY, @ResultWidth, @ResultHeight)
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: GetGadgetSize()

Post by IdeasVacuum »

...yes, I mean the inverse of ResizeGadget().
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply