[solved] widget draw_frame
Hello,
I understand that using draw_frame function when wanting to draw a frame to a widget is done by python code, is that true? If yes, my question is: how can I draw a frame on a widget using only opensesame script?
Besides the option of - frame="yes" - because this shows a grey frame which doesn't look so good, and does not match the word on the widget.
I need the frame to be only a rectangular shape surrounding the word on the widget.
this is the custom form I made:
set margins "150;100;50;100"
set rows "1;1;1;1;1;1"
set spacing "25"
set cols "1;1;1;1;1;1;1;1;1"
set description "A generic form plug-in"
widget 3 0 3 1 label center="yes" text="What shape did you see?"
widget 1 2 1 1 button text="[op1]" frame="true" var="response"
widget 3 2 1 1 button text="[op2]" frame="true" var="response"
widget 5 2 1 1 button text="[op3]" frame="true" var="response"
widget 7 2 1 1 button text="[op4]" frame="true" var="response"
Thank you,
Nagham
Comments
Hi Nagham,
Forms support theming. Currently, there are only two themes available: 'plain' and 'gray'. The default is 'gray', and this theme indeed draws large gray frames. The 'plain' theme only draws an outline, which may be what you want. You can select the theme like so:
Btw, in your example you have
frame="true", which should beframe="yes", as described here:Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
d
Hi,
Thank you, the frame looks good now. There's a problem with the position of the word in it though, when it is a short word it is placed in the center, but when it is a long word it's lower. I tried to set center="yes" but it didn't help.
Any thought on why this happens and how can I fix it?
Thanks again,
Nagham
Hi Nagham,
If you have specified
center="yes"the text should appear in the middle of the frame, regardless of how much text there is (although it will look ugly if the text doesn't fit). Could you post a screenshot + the script, so we can see what exactly goes wrong?Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi,
Is there an email address I can send it to?
Thanks,
Nagham
Hi Nagham,
To upload your experiment you could do the following:
Best,
Lotje
Did you like my answer? Feel free to

It is fixed now thank you, I just had to enlarge the columns width apparantly