Public API to Retrieve Width/Height Type #1801
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
Is there a way to determine the type of width/height that has been set for a node? For instance, how can I differentiate if a width was defined using
setWidth
,setWidthPercent
, orsetWidthAuto
?A potential use case for this would be determining the smallest size of a node based on its content, where the workflow might look something like this:
If such an API doesn’t exist, could you clarify what the default size type is for each axis of a node?
Thank you!
I apologize, according to the documentation, the default type is set to auto. However, it would be beneficial to have an API that exposes this information to avoid the need for manually keeping track of it ourselves.
Which language is this for? APIs like
getWidth()
should return a structure with both a value and unit. "auto" is, maybe unintuitively, considered its own unit.C++ and omg! I had seen that, but I misread it as 'uint' and assumed it was an unsigned integer, possibly for internal calculations. My bad! And thank you!