Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This is next question from the series: better avoid Panel if you care about details. previous about FrameMargins

In the following example ImageSize is on purpose not big enough to display 1, we will see that this causes the Panel to fool us about it's ImageSize.

First case:

With[{opt = Sequence[ImageSize -> {20, 20}, ImageMargins -> 0, Background -> Orange]},
 Row[{
   Panel[1, opt],
   Panel[1, opt]
   }]]

enter image description here

With[{opt = Sequence[ImageSize -> {20, 20}, ImageMargins -> 0, Background -> Orange]},
     Row[{
       Panel[1, opt],
       Panel[1, opt, FrameMargins -> 0]
       }]]

enter image description here

Again, there is no problem with Framed.

WinXP V9.0.1

Is this OS dependent problem too? Is appriopriate tag?, because I see no reason that FrameMargins should affect overall ImageSize.

share|improve this question
    
Are you complaining about the two panels in the 2nd example not being the same size? They are for me running V9.0.1 on OS X. –  m_goldberg Mar 25 '14 at 21:42
    
@m_goldberg Yes. Well, I was expecting it is OS dependent, like the linked one. Now I'm waiting for WRI answer. –  Kuba Mar 25 '14 at 21:45
    
Any reply from WRI? –  Mr.Wizard 2 days ago
1  
@Mr.Wizard this is what they sent: 2) The second issue appears to affect only smaller ImageSize of 10 or 20 px. I checked with a developer about this issue and this is what he has to say. ------------------------------------ On comparing these two: Panel[1, ImageSize -> {10, 10}] Panel[1, ImageSize -> {20, 20}] vs. Panel[1, ImageSize -> {10, 10}, FrameMargins -> 0] Panel[1, ImageSize -> {20, 20}, FrameMargins -> 0] tbc... –  Kuba 2 days ago
1  
@Mr.Wizard ... " Without explicit FrameMargins, Panel changes very little at these sizes. But, with FrameMargins -> 0, it does. I suspect setting FrameMargins -> 0 removes a constraint on the minimum size that is imposed by the default FrameMargins setting. So, at theses sizes, I don't think it is a bug, just it initially seems odd." –  Kuba 2 days ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.