Login
Login
Register
MaterialUI Support
Questions
Unanswered
Ask a Question
Documentation
Home
Ask a Question
How I Get Material Button Width and Height
0
votes
asked
Jul 28, 2016
in
Help
by
erkanceylan
(
150
points)
On my application, i instantiate a few material button, and i want to get width and heigth of instance. I can't find any answer, pleaase help me.
Your comment on this question:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
1 Answer
0
votes
answered
Aug 2, 2016
by
admin
(
31,720
points)
selected
Aug 22, 2016
by
admin
Best answer
Hi there,
You can access the button's .rectTransform, and use .rect.width and .rect.height.
~ Declan.
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Welcome to MaterialUI support! Ask us anything :)
All categories
Issue
(55)
Critical bug
(20)
Editor
(4)
Feature request
(13)
Help
(52)
...