Hi Paul,
This change to elements.xml won't help. Similar change has to be applied to
.webpart file:
...<data>
<properties>
<propertyname="ChromeType"Type="string">None</property>
Regards,
Shahram.
________________________________
From: Paul Noone <paul.no...@ceosyd.catholic.edu.au>
To: ozMOSS <ozmoss@ozmoss.com>
Sent: Tuesday, 27 September 2011 3:04 PM
Subject: RE: MOSS - Web Part chrome is locked
Hi Jorge,
Found it. It can be set as a property of the file element within the module in
elements.xml.
e.g.
<Module...
<File...
<PropertyName="ChromeType"Type="chrometype">None</Property>
Incredibly useful MSDN reference with terrific examples [not]:
http://msdn.microsoft.com/en-us/library/aa544032.aspx
From:ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of
Jorge Carvalho
Sent: Monday, 19 September 2011 9:32 PM
To: ozMOSS
Subject: RE: MOSS - Web Part chrome is locked
Hi Paul,
The CreatechildControls method creates the controls on runtime when the web
part is rendered, not when it is provisioned.
You’re resetting the Chrome type every time you display the web part.
You can define custom settings when you are provisioning the web part as part
of a web template, or in a feature activated event receiver, I’m not sure how
would you go about defining the default chrome for a particular web part
though…. Anyone?
Cheers,
JC
From:ozmoss-boun...@ozmoss.com [mailto:ozmoss-boun...@ozmoss.com] On Behalf Of
Paul Noone
Sent: Monday, 19 September 2011 9:37 AM
To: ozMOSS (ozmoss@ozmoss.com)
Subject: MOSS - Web Part chrome is locked
Hi all,
I’m sure I’ve done something silly but I’m unable to change the chrome settings
for a custom web part via the UI.
They always revert to what I’ve defined in CreateChildControls.
protectedoverride void CreateChildControls()
{
if (!error)
{
try
{
base.CreateChildControls();
this.ChromeType = PartChromeType.TitleOnly;
Table table = new Table();
// etc...
row.Controls.Add(cell);
table.Controls.Add(row);
this.Controls.Add(table);
Is there a simple way to prevent this?
Kind regards,
Paul
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
_______________________________________________
ozmoss mailing list
ozmoss@ozmoss.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss