2011-06-09 7 views
5

में मैनिपुलेट का उपयोग करके नियंत्रण प्लेसमेंट मैं गुलाबी & ग्रीन चेकबॉक्स नियंत्रण को एक पंक्ति पर प्रदर्शित करना चाहता हूं। ControlPlacement सहायता पर व्यापक रूप से देखने के बावजूद, मैं इसे काम करने के लिए अनुकूलित नहीं कर सकता।मैथमैटिका

Manipulate[ 
Graphics[{If[thePink, {Pink, Disk[{5, 5}, r]}], 
If[theGreen, {Green, Disk[{4, 2}, r]}]}, 
PlotRange -> {{0, 20}, {0, 10}}], {{r, 1, 
Style["Radius", Black, Bold, 12]}, 1, 5, 1, ControlType -> Setter, 
ControlPlacement -> Top}, {{thePink, True, 
Style["Pink", Black, Bold, 12]}, {True, False}}, {{theGreen, False, 
Style["Green", Black, Bold, 12]}, {True, False}}] 

enter image description here

उत्तर

5

उपयोग Row[ ] और Control[ ]:

Manipulate[Graphics[{If[thePink, {Pink, Disk[{5, 5}, r]}], 
    If[theGreen, {Green, Disk[{4, 2}, r]}]}, PlotRange -> {{0, 20}, {0, 10}}], 
    {{r, 1, Style["Radius", Black, Bold, 12]}, 1, 5, 1, ControlType -> Setter, 
                ControlPlacement -> Top}, 
Row[ 
    {[email protected]{{thePink, True, Style["Pink", Black, Bold, 12]}, {True, False}}, 
    Spacer[20], 
    [email protected]{{theGreen, False, Style["Green", Black, Bold, 12]}, {True,False}}}]] 

enter image description here

+0

हमेशा की तरह, धन्यवाद। मुझे आशा है कि मैं जल्द ही कड़ी मेहनत करूँगा, आप बस अच्छे हैं! – 500

संबंधित मुद्दे