|
Rank: Member Groups: Member
Joined: 4/30/2008 Posts: 21
|
I have a toolbar with a dropdown menu. When I disable it, the dropdown button does not disable. What do I need to do to get the drop down button to disable when the dropdown menu is disabled?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi,
Have you tried to disable the toolbar button by setting the ToolBar button's Disabled to true?
Thanks
|
|
Rank: Member Groups: Member
Joined: 4/30/2008 Posts: 21
|
Um, yeah. But when I do the dropdown button (far right side image) does not disable.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi, It does get disabled, except that the arrow does not turn gray. You can turn it gray by providing such an image. The following steps describe how to do that with one of the built-in templates: 1. Right click the toolbar to bring up ToolBar Builder; 2. Select DropDownMenu Item from "Item Template". If you do not use item template, select the toolbar button directly. You can find more information about item template at here: http://www.essentialobjects.com/ViewDoc.aspx?t=ToolBar%2fcustomize.html3. Expand "NormalStyle" from the right side and copy CssText property; 4. Expand "DisabledStyle" and paste CssText property. Now DisabledStyle.CssText has the same value as NormalStyle.CssText; 5. Change DisabledStyle's BackgroundImage property. The default style uses a built-in image. You may need to create a gray arrow image and use your own custom image; If you do not use built-in template, the steps may be slightly different. However the idea is the same ---- set DisabledStyle to provide your own custom image. Thanks
|
|
Rank: Member Groups: Member
Joined: 4/30/2008 Posts: 21
|
I am using client side events with the drop down menu. And if I click the drop down arrow, the events fire.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Shawn wrote:I am using client side events with the drop down menu. And if I click the drop down arrow, the events fire. We tested it with the latest version and we do not see such problems. Our steps are: 1. Drop a new ToolBar controls into the form; 2. Initialize the ToolBar from one of the built-in template; 3. Change one of the ToolBarItem's Type to "DropDownMenu"; 4. Change one of the ToolBarItem's Disabled to true; 5. Provide the ToolBar a ClientSideOnItemClick handler; Run the page and everything works as expected: 1. Click the disabled items, nothing happens; 2. Click other items, the client side handler is called; Please try the same and let us know how it goes. If the problem continues, we will need you to create a test page that demonstrates the problem, we will be happy to take a look as soon as we have that. Thanks!
|
|
Rank: Member Groups: Member
Joined: 4/30/2008 Posts: 21
|
After loking at this a little closer, it seems the eo_web.ashx file contains the problem. When the dropdown menu is disabled and the down arrow is clicked, the javascript in the eo_web.ashx fires anyway. The javascript that runs contains the following code:
[removed by admin]
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi Shawn,
Can you follow our previous reply and let us know what happens? Nothing should be firing as long as the toolbar item is disabled.
Thanks
|
|
Rank: Member Groups: Member
Joined: 4/30/2008 Posts: 21
|
Just to be clear. All the toolbar Items that I disable show up disabled and when I click on them they do not fire, including the toolbar item whose type is DropDownMenu.
The problem is, when I click on the drop down arrow of the item whose type is set to DropDownMenu, when the item is disabled, an event fires. Also, there are no menu items within the dropdown menu. So the toolbar item, whose type is set to DropDownMenu, does not contain child menu items and is disabled and its drop down arrow is clicked, an event fires.
Also, I do use the process you describe to create the dop down menu toolbar button.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,193
|
Hi,
Something must be lost in translation. We specifically tried the following:
1. Set the item's Disabled to true; 2. Click the drop down arrow next to the item image;
And we do not see ClientSideOnItemClick to be fired. It appears that you tried the same steps but have different result.
The only difference we can think of is the versions. We tested it with the latest version (2008.0.32). So if you are not on that version, you may wish to upgrade to the latest version.
If the problem continues, we will need to see it happening in order to find out the root cause. You can either post a test page online, or we can setup an online meeting to take a look on your machine. Please just let us know.
Thanks!
|
|