Psychopy Dialogue Formatting (visual)

329 views
Skip to first unread message

Horea Christian

unread,
Jan 14, 2013, 4:44:02 PM1/14/13
to psychop...@googlegroups.com
Hello, I'm following the experiment protocol tutorial from the website, and modifying it step-by-step to suit my situation. I'm still early in the process, but I'm confronted with problems the psychopy.gui.Dlg* visual formatting. In short: it looks like this, and I can't change it


I'd like the names of the fields to be aligned, and the fields themselves broader. How can I do this?

Cheers,

Jonathan Peirce

unread,
Jan 15, 2013, 5:20:14 AM1/15/13
to psychop...@googlegroups.com
For me the following code:


from psychopy import gui, data

# create a DlgFromDict
info = {'Date':data.getDateStr(),
    'Gender':['male','female'],
    'Identifier': ''}
infoDlg = gui.DlgFromDict(dictionary=info, title='Experiment1',
    order=['Date', 'Gender', 'Identifier'],
    fixed=['Date'])#this attribute can't be changed by the user
if infoDlg.OK: #this will be True (user hit OK) or False (cancelled)
    print info
else:
    print 'User Cancelled'


gives this dialog on my mac:

which seems to be what you wanted.

So either your code is including some extra (non-visible) characters or it's a specific problem on your OS. Maybe paste your code and tell us what OS you're on (although there's not much we can do there).

Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/psychopy-users/-/OoUsPl5N73sJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

-- 
Jonathan Peirce
Nottingham Visual Neuroscience

http://www.peirce.org.uk



Florian Schöngaßner

unread,
Feb 22, 2014, 7:38:40 PM2/22/14
to psychop...@googlegroups.com
I'm using Win7 64bit and Ubuntu 12.04 64bit. On both systems I get the same strange alignment. My sample code, generated by the builder:

from psychopy import data, gui, core

# Store info about the experiment session
expName = 'vampirZahn'  # from the Builder filename that created this script
expInfo = {'Gruppe':'KG',
    'Haendigkeit':'R',
    'Durchgang':'1',
    'VP-Code':'XX0000',
    'Geschlecht':'W'}
dlg = gui.DlgFromDict(dictionary=expInfo, title=expName)
if dlg.OK == False: core.quit()  # user pressed cancel

All with psychopy 1.79.01

Jonathan Peirce

unread,
Feb 26, 2014, 6:28:52 AM2/26/14
to psychop...@googlegroups.com
Hi Florian,

I'm sure this could be improved by changes to the psychopy/gui.py file, but it's a low priority for me. If you manage to make that code better then let us know any changes you'd like to be pushed 'upstream' so that others can benefit (and so that you don't have to repeat your fix in future releases).

best wishes,
Jon
--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to psychopy-user...@googlegroups.com.

To post to this group, send email to psychop...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

-- 
Jonathan Peirce
Nottingham Visual Neuroscience

http://www.peirce.org.uk

This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.


Jeremy Gray

unread,
Feb 26, 2014, 1:13:41 PM2/26/14
to psychop...@googlegroups.com
here's an example of some changes to gui.py, for changing the input box size: https://github.com/jeremygray/psychopy/commit/c40f0477d8a285817039334ed0d8c0fc47466797

--Jeremy


Reply all
Reply to author
Forward
0 new messages