-
21 Aug 2007 3:28 AM #11
Nice,
Thank you Nullity, it was the inclusion order of the Javascript libraries.
Is there a place where these directive are available in the documentation or on the web? I didn't saw that anywhere.
Thanks again,
Francois
-
21 Aug 2007 5:30 AM #12
There is a text file included in the Ext package you download from this site called 'INCLUDE_ORDER.txt'.
-
21 Aug 2007 7:00 AM #13
-
22 Aug 2007 4:46 PM #14
I am a bit confused here as to how to add something other than text or html markup (in this case i want to add a Ext.Toolbar.MenuButton). Can you provide an example of this, or am i just not understanding how this works and this isnt supported?
-
23 Aug 2007 6:41 AM #15
Well, I mainly created this for text and simple HTML, so that isn't supported directly. However, you can do something like this which works just fine:
As in, use the MiscField to create an empty DIV, then after the form is rendered, create your Ext element and render it to that empty DIV.Code:var form = new Ext.form.Form({ labelWidth: 85 }); form.add( new Ext.form.MiscField({ fieldLabel: 'MiscField', id: 'miscfield_button', width: 160, value: '<div id="test_button"></div>' }) ); form.render('myForm'); var myButton = new Ext.Button('test_button', { text: 'Button' });
-
23 Aug 2007 8:14 AM #16
Ok, I was just completely wrong on that one then, thanks.
Now a Button renders fine, but a Toolbar.Button's constructor doesn't take a "renderTo" option. But thats my problem and not yours
-
23 Aug 2007 8:24 AM #17
Just FYI - if all you are after is a menu, the Ext.Button constructor supports a 'menu' option.
-
23 Aug 2007 8:43 AM #18
Yeah, I did explore that option and it does work, but I dont like the behavior. The problem is that the button's main handler is called even when clicking on the menu expander portion of the button. What I really am after is the toolbar's SplitButton.
-
23 Aug 2007 9:00 AM #19
I have been doing just this [adding a div I render a button to afterward], and it works well.
I know it's a topic beat to death, but the fine-grained control
over placement of form controls is the one thing I miss in Ext.
I still not going back, tho.
--danLast edited by dantheman; 23 Aug 2007 at 10:35 AM. Reason: several intervening posts made me unclear :)
-
23 Aug 2007 10:43 AM #20
Well dont I feel like a tool, theres a Ext.SplitButton right there waiting for me to use it

I did have to make a small modification though, to prevent the button from being wiped out with a form.reset():
(new config option disableReset)PHP Code:/**
* Resets the current field value to the originally-loaded value
*/
reset : function(){
if (!this.disableReset){
this.setRawValue(this.originalValue);
}
},
Perhaps there is a better way to do this but for now this works for me.


Reply With Quote