Problem with ImageButton attributes

7 views
Skip to first unread message

TomasBar

unread,
Mar 21, 2013, 11:51:31 AM3/21/13
to toscawidge...@googlegroups.com
Hello,

I have defined an image button in a form thus:

image_button=twf.ImageButton(modname = 'tw2.forms', filename = 'static/info.png',alt='Info')

Whenever it gets clicked, I get the following error message:

keywords must be strings

I have tried to define the attributes like this instead:


image_button=twf.ImageButton(attrs={'modname' : 'tw2.forms', 'filename' : 'static/info.png','alt':'Info'})

But then I get the following error message:

ParameterError: Either 'link' or 'filename' must be specified

Many thanks for any help.

Tomas
Reply all
Reply to author
Forward
0 new messages