Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #7344
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | How to not show the scrollbars when ContentSize does not fit the content in Manipulate? |
| Date | 2011-12-19 12:20 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jcna79$e6l$1@smc.vnet.net> (permalink) |
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
How to not show the scrollbars when ContentSize does not fit the content in Manipulate? "Nasser M. Abbasi" <nma@12000.org> - 2011-12-19 12:20 +0000
csiph-web