Loading...
Processing Forum
Recent Topics
All Forums
Move this topic
Forum :
Share your Work
Programming Questions
Core Library Questions
Contributed Library Questions
Android Processing
Processing with Other Languages
Integration and Hardware
Library and Tool Development
Events and Opportunities
General Discussion
Sub forum :
Move this topic
Cancel
Contributed Library Questions
zmalex
How to arrange controlP5 RadioButtons horizontally?
in
Contributed Library Questions
•
1 year ago
Does anyone know?
Looking the the controlP5 homepage the image shows a horizontal layout. But the example code arranges them vertically. I can't figure out how to arrange them horizontally. Thanks.
1
Replies(1)
zmalex
Re: How to arrange controlP5 RadioButtons horizontally?
1 year ago
Figured it out.
Does not work as expected
RadioButton adlAnimationStepRadio = null;
Toggle adlAnimationStepToggle = null;
adlAnimationStepRadio = controlP5.addRadioButton("Animation Step", 20, 60);
adlAnimationStepRadio.deactivateAll();
adlAnimationStepToggle = adlAnimationStepRadio.addItem("1",1);
adlAnimationStepToggle.setPosition(20, 60);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("5",5);
adlAnimationStepToggle.setPosition(20, 0);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("10",10);
adlAnimationStepToggle.setPosition(40, 0);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("20",20);
adlAnimationStepToggle.setPosition(60, 0);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("50",50);
adlAnimationStepToggle.setPosition(80, 0);
Works as expected
RadioButton adlAnimationStepRadio = null;
Toggle adlAnimationStepToggle = null;
adlAnimationStepRadio = controlP5.addRadioButton("Animation Step", 20, 60);
adlAnimationStepRadio.deactivateAll();
adlAnimationStepRadio.setItemsPerRow(7);
adlAnimationStepRadio.setSpacingColumn(20);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("1",1);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("5",5);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("10",10);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("20",20);
adlAnimationStepToggle = adlAnimationStepRadio.addItem("50",50);
Leave a comment on zmalex's reply
Change topic type
Topic Type :
Discussions
Questions
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to zmalex's question
Top
Reply
{"z7343215":[25080000001316020,25080000001316033]}
Statistics
1
Replies
532
Views
0
Followers
Tags
No tags available for this topic.
Cancel
Actions
Permalink
Related Posts
ControlP5: Any way of displaying Ch...
[controlp5] how to change font size...
Modifying ControlP5 range sliders/l...
Why my controlP5 is blurry and how ...
Setting a second window undecorated...