PDA

View Full Version : Howto add a reload toolbar button to contentpanel?


Wolfgang
12-27-2006, 03:38 AM
Hello,

i am using borderlayout with same contentpanels. Some of the content panels load their content via XHR using setUrl().
Now i would like to add a button to the contentpanel, that allows to just reload/refresh the content of that particular contentpanel. This button should show up similar to the existing buttons like close/minimize in the upper part of the panel.
Is this something, that is already part of the contentpanel or can it be achived easily if not?

Regards

Wolfgang

tryanDLS
12-27-2006, 11:39 AM
I believe there have been some discussions in the forum regarding this. If not, you could look at the CP code to see what it does to render the 'X' when 'isClosable:true' is specified. You could do the same thing to render something else to that area and attach you own events.

Wolfgang
12-27-2006, 03:15 PM
In the source of Contentpanel i found the refresh() method that does exactly what i am looking for :) However, i still do not know how to add and activate the button. Seems it needs a bit more investigation...