Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

buttons

31 views
Skip to first unread message

Dennis Backhaus

unread,
Jul 30, 2013, 10:45:19 AM7/30/13
to toscawidge...@googlegroups.com
Is there an up-to-date version of this page somewhere:

http://toscawidgets.org/documentation/tw.forms/modules/fields/buttons.html

?

I am interested in what args I can give a SaveButton or a CancelButton (which does not even appear in this list). Specifically I want to know how to direct to a specific link upon pressing a CancelButton().

Thanks in advance

Dennis Backhaus

unread,
Jul 30, 2013, 11:32:03 AM7/30/13
to toscawidge...@googlegroups.com
problem solved.

'link' and 'value' are arguments I can give to a button. Anyone know what other args a button can take?

Moritz Schlarb

unread,
Jul 30, 2013, 6:06:44 PM7/30/13
to toscawidge...@googlegroups.com
As I already said on your SO question:

(stolen from http://www.codinghorror.com/blog/2012/04/learn-to-read-the-source-luke.html)


ToscaWidgets 1 is quite unmaintained and the docs aren't useful, too, which in fact made me switch to ToscaWidgets 2.

Dennis Backhaus

unread,
Jul 31, 2013, 10:05:28 AM7/31/13
to toscawidge...@googlegroups.com

I am using TW2. If you read my initial question again:

I was asking for an up-to-date version of the linked page because I could not find one.

Moritz Schlarb

unread,
Jul 31, 2013, 12:00:10 PM7/31/13
to toscawidge...@googlegroups.com
Well, you never actually really said that you use TW2...
And the link in your initial question points to the TW1 docs, which are at their up-to-date version...

Since TW2 is a different piece of software, not just a higher version, so the docs are different  of course.

But anyways, it seems you're searching for this: http://tw2-demos.threebean.org/module?module=tw2.forms#Button

Dennis Backhaus

unread,
Aug 1, 2013, 12:01:05 PM8/1/13
to toscawidge...@googlegroups.com
Excuse me for not being clear before.

Thank you for the link. Unfortunately it does not help a bit, since it does not tell me in any way what arguments I can give to a Submit or a Cancel Button. The documentation only includes a text messages telling me that a SubmitButton is used to submit a form. Anyways, I already solved my problem. I was just hoping for some better documentation for future/similar questions.

Thanks again for the feedback :)

alonp

unread,
Aug 3, 2013, 10:23:48 AM8/3/13
to toscawidge...@googlegroups.com
I don't know alot about the twf.button object, but have you tried:

onClick="window.location.href='where/you/wanna/go'"

I mean:

    class btn(twf.button):
        value = 'cancel'
        attrs = {'onclick': 'window.location.href="where/you/wanna/go"'}

 
Reply all
Reply to author
Forward
0 new messages