Select to view content in your preferred language

Is there a remove or disable WidgetTemplate Titlebarbutton

705
2
07-13-2011 07:50 AM
LarryPhelps
Regular Contributor
I am looking for a method or way to disable or turn off a Titlebarbutton after adding one using :

wTemplate.addTitlebarButton("assets/images/i_table2.png", "Show Results in Grid",showGridResults,false);
Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
Larry,

   Try to remember to post Flex Viewer Question to the viewer forum.

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex


Here is some code to do that:

for (var hb:int=0; hb<wTemplate.headerToolGroup.numElements; hb++){
                    var tbb:TitlebarButton = wTemplate.headerToolGroup.getElementAt(hb);
                    if(tbb.callback == showGridResults)
                        tbb.enabled = false;
                }
0 Kudos
LarryPhelps
Regular Contributor
Larry,

   Try to remember to post Flex Viewer Question to the viewer forum.

http://forums.arcgis.com/forums/111-ArcGIS-Viewer-for-Flex


Here is some code to do that:

for (var hb:int=0; hb<wTemplate.headerToolGroup.numElements; hb++){
                    var tbb:TitlebarButton = wTemplate.headerToolGroup.getElementAt(hb);
                    if(tbb.callback == showGridResults)
                        tbb.enabled = false;
                }


Awesome ! Thank You Robert !!!
0 Kudos