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.

MMA 9.0.1 MacOSX "Mavericks". This issue is apparently mac specific.

The issue of this post is illustrated here, for example. In a SetterBar control straight out of a Manipulate, there are no dividers, though the default appearance in other contexts is to have them. I prefer to have them and don't know why that design decision has been made, but anyway. I found a simple way to restore them using the Paneled option for Manipulate (which happened to produce other beneficial styling effects):

Manipulate[
  Panel@view, {{view, 3, "Fruit:"}, 
    {1 -> "Apples", 2 -> "Pears", 3 -> "Medlars"}, SetterBar}, 
  AppearanceElements -> None, Paneled -> True]

Manipulate[
  Panel@view, {{view, 3, "Fruit:"}, 
    {1 -> "Apples", 2 -> "Pears", 3 -> "Medlars"}, SetterBar}, 
  AppearanceElements -> None,  Paneled -> False]

Panel@
Manipulate[
  Panel@view, {{view, 3, "Fruit:"}, 
    {1 -> "Apples", 2 -> "Pears", 3 -> "Medlars"}, SetterBar}, 
  AppearanceElements -> None, Paneled -> False]

Output of code above

My question: is there a better way to get the dividers back from within a Manipulate?

share|improve this question
1  
I have them in the three cases see here. –  Öskå Apr 28 at 10:35
    
I can reproduce it on V9.0.1 Mac OS 10.8.5. –  Michael E2 Apr 28 at 10:51
    
@Öskå maybe a Mac issue then. –  fairflow Apr 28 at 10:52
    
@fairflow then you can add the osx tag :) –  Öskå Apr 28 at 10:57
    
Actually the divider is there, but it's barely visible. –  Szabolcs Apr 29 at 1:32

2 Answers 2

An alternative is a TabView. It will certainly work for your toy problem, but whether it has the functionality you need for your real problem is ... well ... problematic. Here is an implementation of your toy.

Module[{items, lbls, rules},
  items = Panel[#] & /@ Range@3;
  lbls = {"Pears", "Peaches", "Pomegranates"};
  rules = Thread[Rule[lbls, items]];
  Panel @ TabView[rules, 2,
    ImageSize -> 200,
    Alignment -> {Center, Center},
    ControlPlacement -> {Top, Center}]]

TabView

share|improve this answer
    
Actually this approach works fine within the first argument to Manipulate, I can get a TabView controlled by a variable of the Manipulate, and which also sets this variable as a SetterBar would. But I don't see how to get a Control which is also a TabView within the 2nd argument to Manipulate, which is what I need for layout purposes. I'm producing CDF's btw. –  fairflow Apr 29 at 8:42

There may be a better way but

Panel@
 Manipulate[
  Panel@view, {{view, 3, "Fruit:"}, 
     {1 -> "Apples", 2 -> "Pears", 3 -> "Medlars"}, SetterBar}, 
   AppearanceElements -> None, Paneled -> False]

is the best I've found that allows me to put my view into the 2nd argument (control section) of Manipulate, though I appreciate m_goldberg's suggestion. With apologies, I plan to accept this answer instead.

share|improve this answer
    
This isn't yet a good answer. I'll post an answer that shows exactly what I need, i.e. a nice-looking view in the control section of a Manipulate –  fairflow Jun 10 at 9:45

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.