Jun 16, 2010, 9:16 AM
[CLOSED] ConfigOptions, how to add custom option?
Hello!
I want add my custom config option in component config. In JS I simple do: new Ext.form.Field({allWathIWant: 'text', qtipText: 'it is my custom qtip'});
I want add my custom config option in component config. In JS I simple do: new Ext.form.Field({allWathIWant: 'text', qtipText: 'it is my custom qtip'});
public static void SetLabel(this Field fld, string labelText, string hint)
{
// I try this:
//fld.ConfigOptions.Add("qtipText", new ConfigOption("qtipText", null, string.Empty, labelText));
// or this:
fld.ConfigOptions.Add("qtipText", string.Empty, hint);
}
// Example of code usage
var checkbox = new Checkbox() // or ComboBox, or TextField, or ...
{
ID = id + "_" + FieldInfo.Name,
Name = FieldInfo.Name,
FieldLabel = FieldInfo.Name,
DataIndex = FieldInfo.Name,
Width = DefaultFieldWidth,
Checked = (bool)(value ?? false)
};
checkbox.SetLabel('hello','ololo');
But result config have not my custom config options. Why? Where I wrong?