I have created a panel, say Panel[""]. I want to know its size/dimensions. Is there any built-in function for doing that?
Asked
Active
Viewed 370 times
1
Piotr Semenov
- 1,553
- 12
- 22
santhosh
- 41
- 1
1 Answers
2
You could get the size of the rasterized panel:
Rasterize[Panel[""]][[2]]
ImageSize -> {18, 33}
Rasterize[Panel["What is my size?"]][[2]]
ImageSize -> {97, 33}

VLC
- 9,818
- 1
- 31
- 60
Panelobject as an image? It is not a good idea becausePanelis a kind of dynamic expression in Mathematica. Only "static" objects have dimensions and size (for example,Image). – Piotr Semenov Dec 19 '12 at 18:35