Howdy, Stranger!

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

Supported by

Layout issues for grouped items using rating scale

edited May 23 in OpenSesame

Dear all openSesame enthusiasts!

Maybe one could help me solving a layout problem. Do you know a trick to align the item text (bottom line) at the same height as the checkboxes of the rating scale?

I tried to combine the RatingScale with Text within a form. Thanks to Sigmund.ai, that has optimized the code I got (unfortunately) only the solution you can see in the figure attached to my post.

Thanks for the support, that I appreciate very much!

All the best,

F.

Code of inline_skript:

# START_PREPARE_PHASE

# ───────────── PREPARE PHASE ─────────────

statements = [

    u"Ich beschäftige mich in meiner Freizeit viel mit musikbezogenen Aktivitäten.",

    u"Ich kann leicht Melodien wiedererkennen.",

    u"Musik ist mir wichtiger als vielen anderen Menschen.",

    u"Ich kann einen Song nach einigen Takten wiedererkennen.",

    u"Ich singe häufig oder summe Melodien."

]

n_items = len(statements)



rows = [1] * n_items + [2, 1]               # 1 Zeile pro Item | Leerzeile | Button

form = Form(

    cols=[2, 4],                            # ursprüngliche Spaltenbreite

    rows=rows,

    margins=(60, 60, 60, 60),               # Standard-Margins

    spacing=0,                              # minimaler Horizontalabstand

    theme='gray',

    timeout=30000

)



# Skalen

rs_labels = [

    u"Stimme<br>ganz und gar nicht zu<br>",

    u"Stimme<br>nicht zu<br>",

    u"Stimme<br>eher nicht zu<br>",

    u"<br>Weder noch<br>",

    u"Stimme<br>eher zu<br>",

    u"Stimme<br>zu<br>",

    u"Stimme<br>voll und ganz zu<br>"

]

scales = [

    RatingScale(nodes=rs_labels, orientation='horizontal',

                click_accepts=False, var='GoldMSI1'),

    RatingScale(nodes=7, orientation='horizontal', click_accepts=False, var='GoldMSI2'),

    RatingScale(nodes=7, orientation='horizontal', click_accepts=False, var='GoldMSI3'),

    RatingScale(nodes=7, orientation='horizontal', click_accepts=False, var='GoldMSI4'),

    RatingScale(nodes=7, orientation='horizontal', click_accepts=False, var='GoldMSI5')

]



# Widgets einsetzen

row_idx = 0

for txt, scale in zip(statements, scales):

    form.set_widget(Label(text=u"<br>" + txt, center=False), (0, row_idx))

    form.set_widget(scale,                               (1, row_idx))

    row_idx += 1



# Leerzeile + Button

next_btn = Button(text=u"Weiter")

form.set_widget(next_btn, (0, len(rows)-1), colspan=2)



# START_RUN_PHASE

# ─────────────── RUN PHASE ───────────────

form._exec(focus_widget=scales[0])


Comments

  • Hi @platzf

    If I understand correctly, the text is aligned with the top of the checkboxes by default, and you’d like it to align with the bottom line instead; is that right?

    One possible workaround I found is to fine-tune the linebreak by adding a styled non-breaking space before the statement text. Something like this:

    Depending on your font size and experiment settings, you can play with the font-size parameter to get just the right visual alignment.

    Let me know if that works for you!

    Best,

    Claire

  • Dear @cvanbuck


    thank you very much for your suggestions. However, it did not work. Therefore I tried another approach, but unfortunately with other problems (mainly that response categories stored with the statements of my items were not presented but instead the statement again...).


    Best,

    Friedrich

  • edited June 6

    Hi @platzf

    Could you please share your OpenSesame experiment file (.osexp) so that I can take a closer look? The above "trick" worked for me, so it would help to see your experiment's settings and structure.

    Cheers,

    Claire

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