MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to not show the scrollbars when ContentSize does not fit the content in Manipulate?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123790] Re: How to not show the scrollbars when ContentSize does not fit the content in Manipulate?
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Mon, 19 Dec 2011 07:19:43 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Ok, issue completely resolved now. No white line and no
traces of it.

Here is the complete code:

-------------------------------
Manipulate[
  p = Framed@
    Plot[Sin[x], {x, -y, y}, ImageSize -> 300, Background -> White,
     ImagePadding -> 20];
  {}, Grid[{{Control[{{y, N@Pi/2, "y"}, -Pi, Pi,
       Appearance -> "Labeled"}]}, {Dynamic@p}}],
  AppearanceElements -> "ManipulateMenu", ControlPlacement -> Center,
  Alignment -> Center, ImageMargins -> 1, FrameMargins -> 0,
  ContentSize -> {0}]
-----------------------------

Thanks for the kind folks who helped me on this in the
other Mathematica forum. Issue closed. Just thought I should
update here as well since I posted the question in 2 places.

--Nasser

On 12/18/2011 10:35 PM, Nasser M. Abbasi wrote:


> Hello,
>
> This is for V 8.04
>
> This is an example of what I'd like to do: Put all the
> display in the control area of Manipulate itself:
>
> (I have a reason for wanting to do this)
>
> ---------------------------------
> Manipulate[
>
>    p = Framed@
>      Plot[Sin[x],{x, -y, y},ImageSize->300,
>           Background->  White, ImagePadding ->  20];
>      {},
>
>    Grid[{
>      {Control[{{y, N@Pi/2, "y"}, -Pi, Pi, Appearance ->  "Labeled"}]},
>      {Dynamic@p}
>      }],
>
>    ControlPlacement ->  Left,
>    Alignment ->  Center,
>    ImageMargins ->  1,
>    FrameMargins ->  1,
>    ContentSize ->  {0}
>    ]
> ---------------------------------------
>
> The problem is that M adds a scroll bar automatically to
> the top right side.
>
> The help says
>
> "If ContentSize specifies a content area that does not
> completely fit the contents, then unless specified otherwise
> with AppearanceElements, functions like Manipulate display a
> resize area, as well as scrollbars when necessary."
>
> In the above, notice it says: "unless specified otherwise with
> AppearanceElements", but I was not able to find out what this means.
> What does 'otherwise' is supposed to mean?
>
> The closest I got is by adding
>
>            AppearanceElements ->  ""
>
> to the above. So the new version now becomes
>
> ----------------------------
> Manipulate[
>    p = Framed@
>      Plot[Sin[x], {x, -y, y}, ImageSize ->  300, Background ->  White,
>       ImagePadding ->  20];
>    {},
>    Grid[{
>      {Control[{{y, N@Pi/2, "y"}, -Pi, Pi, Appearance ->  "Labeled"}]},
>      {Dynamic@p}
>      }],
>
>    ControlPlacement ->  Left,
>    Alignment ->  Center,
>    ImageMargins ->  1,
>    FrameMargins ->  1,
>    ContentSize ->  {0},
>    AppearanceElements ->  "" (*added this *)
>    ]
> -----------------------------------------
>
> But notice that the size is not quite correct to the
> right still, it should be more tight, and I also lost
> the '+' that used to be there. I have to keep that.
>
> So, I think what I need is just to find what the element
> name for '+' is, so I can use the correct
> AppearanceElements ->  "correctNameHere" and I am hoping
> that this will do the right thing. (I tried "Close" but that
> did not do it, I lost the '+' as well)
>
> I just could not find what that '+' element name is.
>
> Any one knows?
>
> Here are the places to find more information on this:
>
> http://reference.wolfram.com/mathematica/ref/Manipulator.html
>
> http://reference.wolfram.com/mathematica/ref/ContentSize.html
>
> So, the question is: How to completely remove the scroll bar
> effect shown above, but at the same time keep the '+' in
> the top right corner.
>
> thank you for any hints
>
> --Nasser
>




  • Prev by Date: How to not show the scrollbars when ContentSize does not fit the content in Manipulate?
  • Next by Date: Re: How to not show the scrollbars when ContentSize does not fit the content in Manipulate?
  • Previous by thread: How to not show the scrollbars when ContentSize does not fit the content in Manipulate?
  • Next by thread: Re: How to not show the scrollbars when ContentSize does not fit the content in Manipulate?