:: Forum >>
Disabling a checkbox template
Hi,
I am placing a AW.Templates.Checkbox inside of a header template on the 0th column and I am wondering how to make it appear disabled?
I can do:
var test = new AW.Templates.Checkbox;
test.setAttribute("disabled", "disabled");
This will disable the checkbox fine but I want it to show up greyed out and unclickable to the user. I saw in another post that you can do this:
var disabled = new AW.Grid.Header;
disabled.onMouseOver = null;
disabled.onMouseOut = null;
obj.setHeaderTemplate(disabled,0);
So I attempted this:
var test = new AW.Templates.Checkbox;
test.setAttribute("disabled", "disabled");
test.onMouseOver = null;
test.onMouseOut = null;
If there is no way to get it to show up greyed out. How do I go about setting the onclick event to null?
I tried
test.onClick = null;
test.onMouseClick = null;
test.onclick = null;
and none of them work. While it doesn't do anything when the user clicks on the checkbox in it's current state. It would be nice if when the user clicked on it, nothing appeared to happen.
Any help would be appreciated.
jLH
Thursday, March 12, 2009
For headers it's easier using normal controls instead of templates, so
I would suggest to use AW.UI.Checkbox and setControlDisabled()
Thursday, March 12, 2009
The only problem with doing it this way is that the checkbox doesn't appear correctly in the header template and I get this ugly styling issue.
jLH
Thursday, March 12, 2009
After reading some more on the forums I found that this line will change the color of the box.
obj.getHeaderTemplate(0).getContent("box").setStyle("background", "#aca899");
Now I would just have to change the image of the checkbox that is shown. I noticed that all the checkboxes are displayed on a .png and then I'm assuming there's code to only show a specific portion of that image. Is there anyway to change the image shown?
Any help would be appreciated.
jLH
Tuesday, March 24, 2009
Anthony
Wednesday, March 25, 2009
I don't believe this operation can be performed on a template, however. :(
jLH
Wednesday, March 25, 2009
Alex,
Is there going to be future support for a method that you can call on the checkbox template to disable it?
jLH
Wednesday, March 25, 2009
This topic is archived.
Back to support forum
Forum search