| Page 1 of 1 | [ 4 posts ] |
|
Hi,
I have a dialog with a couple of buttons. I need to change which button is the default button. I can make a button look like the default button by adding the class "default" but that doesn't give it focus. I tried Code: dialog.getButtons()[1].focus(); but that didn't do anything. Is there a way to change the default button for a dialog or should I just add and remove the class "default" to at least indicate the preferred button? Thanks, Paul |
|
There is an option for the button object that can be set when the Dialog is instantiated as "isDefault:true", see the example http://developer.yahoo.com/yui/examples/container/dialog-quickstart.html.
The Dialog user's guide http://developer.yahoo.com/yui/container/dialog shows how to do it after the Dialog is already defined using "dialog.cfg.queueProperty..." method. Todd |
|
Thanks. I already have the buttons (including a default button); I just want to reassign their roles. It looks like my best bet is to make new buttons each time I want to change them, as shown in this post:
viewtopic.php?p=4690#p4690 It's not clear to me how queueProperty and setProperty differ though, other than perhaps setProperty executes immediately. Thanks again, Paul |
|
Sounds like you are close. I assume you are doing myDialog.render() prior to .show() to make sure the changes are made, correct?
|
| Page 1 of 1 | [ 4 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group