Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] ratingscale over 2 rows of a form or aligned vertically

edited June 2013 in OpenSesame

I would like more space for my ratingscale.. Each node has a Dutch name of a healthy snack attached to it and it becomes cluttered..
Can I run the same ratingscale over 2 rows or align it vertically?

Thank you

This is my code now:

import random
from libopensesame import widgets
form = widgets.form(self.experiment, cols=[1,1,1,1,1], rows=[1,1,1,1,1,1,1,1])
exp.gezonde_artikelen = voedsellijst2 = ["aardbei1", "appel7", "banaan1", "bleekselderij1_jpg", "kiwi1", "komkommer1", "yoghurt1", "pear2", "rijstwafel2", "sinaasappel1"]
random.shuffle(voedsellijst2)
plaatjes2 = []
for voedsel in voedsellijst2:
    plaatjes2.append(widgets.image(form,  path=self.experiment.get_file(voedsel + ".png")))

title = widgets.label(form, text='Gezonde Snacks')  
vraag1gezondordenen = widgets.label(form,  text='1. Welke gezonde snacks vind je het MEEST lekker?')
vraag2gezondordenen = widgets.label(form,  text='2. Welke gezonde snack vind je het MINST lekker?')
ratingScale1 = widgets.rating_scale(form, var='gezond_lekkerst',
    nodes=['aardbei', 'appel', 'banaan', 'bleekselderij', 'kiwi', 'komkommer', 'yoghurt', 'peer', 'rijstwafel', 'sinaasappel'])
nextButton = widgets.button(form, text='Verder')
ratingScale2 = widgets.rating_scale(form, var='gezond_minst_lekker',
    nodes=['aardbei', 'appel', 'banaan', 'bleekselderij', 'kiwi', 'komkommer', 'yoghurt', 'peer', 'rijstwafel', 'sinaasappel'])
form.set_widget(title, (0,0), colspan=5)
form.set_widget(plaatjes2[0], (0,1))
form.set_widget(plaatjes2[1], (1,1))
form.set_widget(plaatjes2[2], (2,1))
form.set_widget(plaatjes2[3], (3,1))
form.set_widget(plaatjes2[4], (4,1))
form.set_widget(plaatjes2[5], (0,2))
form.set_widget(plaatjes2[6], (1,2))
form.set_widget(plaatjes2[7], (2,2))
form.set_widget(plaatjes2[8], (3,2))
form.set_widget(plaatjes2[9], (4,2))
form.set_widget(vraag1gezondordenen, (0,3), colspan=5)
form.set_widget(ratingScale1, (0,4), colspan=5)
form.set_widget(vraag2gezondordenen, (0,5), colspan=5)
form.set_widget(ratingScale2, (0,6), colspan=5)
form.set_widget(nextButton, (0,7), colspan=5)
form._exec()

Comments

  • edited 6:28AM

    Hi Natalie,

    Unfortunately it's not possible to adapt the spacing between the rating-scale options according to their word length. So if they don't really fit on one line, I think the best is to use some work-arounds such as:

    1.) Change the margins of the form to have some extra space.

    form = widgets.form(self.experiment, cols=[1,1,1,1,1], rows=[1,1,1,1,1,1,1,1], margins=(10,10,10,10))
    

    2.) Use a smaller font (you can change this under General properties)

    3.) Or present for example all the odd-numbered rating-scale options slightly below the even rating-scale options, such that more of them fit on one row before they start to overlap by using breaks:

    ratingScale1 = widgets.rating_scale(form, var='gezond_lekkerst',
        nodes=['<BR />aardbei', 'appel<BR />', '<BR />banaan', 'bleekselderij<BR />', '<BR />kiwi', 'komkommer<BR />', 'yoghurt', '<BR />peer', 'rijstwafel<BR />', '<BR />sinaasappel'])
    

    I hope this helps!

    Best,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited June 2013

    Hi Natalie,

    as Lotje said I would recommend to change to a smaller font, too.
    http://osdoc.cogsci.nl/usage/text-formatting/

    for example:

    ratingScale1 = widgets.rating_scale(form, var='gezond_lekkerst',
        nodes=['<span size="12">aardbei</span>', '<span size="12">appel</span>'', ...
    

    Also, you could think of using the none labeled rating scale and label your ratings one time at the top with a text label.

    http://osdoc.cogsci.nl/forms/custom-forms/

    Hope i could help a bit,

    Daniel

  • edited 6:28AM

    Thank you both very much. It is solved!
    (In the end it seemed that a bigger monitor already did the trick...pfff.... but your options also work, thank you)

  • edited 6:28AM

    How can I close this discussion BTW?

  • edited June 2013

    To mark a discussion as solved, you can edit the title of the thread and add [solved] (instead of [open]) before the actual title.

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 6:28AM

    Hi Natalie,

    I presume this is you?

    image

    Congratulations!

    Sebastiaan

  • edited 6:28AM

    very late response (sorry, didn't notice it was here until now), but yes, that's me :-)

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games