| Page 1 of 1 | [ 2 posts ] |
|
Hello all,
I am very novice in YUI library (but have some expirience with jquery ui) so ma be question ios stupid. Could you please clarify following scenario: I have created YUI dialog: searchDialog = new YAHOO.widget.Dialog("searchPanel", { width: currentSettings.Width, height: currentSettings.Height, visible: false, constraintoviewport: true, xy: [currentSettings.HorizontalPos, currentSettings.VerticalPos], buttons: [], hideaftersubmit: false, postmethod: 'form', close: false }); searchDialog.render(); searchDialog.show(); then in some event I need to move it to some position and change its size. I haven't found any standard methods like resize or move so my idea is following: 1) to move dialog control just: YAHOO.util.Dom.setXY(searchDialog.element, [0, 0]); 2) to resize it searchDialog.element.style.height = newHeight + 'px'; are these soultions correct? Or may be dialog adds some overhead and these solutions should be improved (because in jquery ui correct solution is to use some internal functions like size, position)? |
|
You should use the Dialogs built in configuration attributes for this:
Code: searchDialog.cfg.setProperty('xy', [0,0]); searchDialog.cfg.setProperty('height', newHeight + 'px'); |
| Page 1 of 1 | [ 2 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