How to customize web part title bar?

G

Guest

I am using ASP 2.0 and trying to put a image in the web part title bar
instead of using a text title. Is there any way to get this done?

Thanks in advance.

Zhenzhong
 
G

Guest

Zhenzhong,

Titleimageurl is used to customize web part title bar. A user with rules
enterSharedState, modifyState can use the behavioreditor at runtime and set
the titleimageurl for all users or the developer can set the webpart
titleimageurl programatically.
me.titleimageurl = "~/images/zany01.gif"

Good Luck
DWS
Need more help with this reply to group or thread
 
G

Guest

Thanks for your reply. I tried to add the "TitleImageUrl" attribute into the
asp code, but it doesnt seem to work properly. and I dont seem to be able to
find the attribute for any of the controls. Can you be a little more specific?

<asp:WebPartZone ID="WebPartZone1" runat="server" BorderColor="#CCCCCC"
Font-Names="Verdana" Height="131px" Padding="6" Width="312px"
PartChromeType="TitleAndBorder">
<ZoneTemplate>
<asp:Label
TitleImageUrl="./Images/hdr_Wellness.jpg" ID="Label1" runat="server"
Text="Hello"></asp:Label>
</ZoneTemplate>
<PartChromeStyle BackColor="#F7F6F3"
BorderColor="#E2DED6" Font-Names="Verdana" ForeColor="White" />
<MenuLabelHoverStyle ForeColor="#E2DED6" />
<EmptyZoneTextStyle Font-Size="0.8em" />
<MenuLabelStyle ForeColor="White" />
<MenuVerbHoverStyle BackColor="#F7F6F3"
BorderColor="#CCCCCC" BorderStyle="Solid"
BorderWidth="1px" ForeColor="#333333" />
<HeaderStyle Font-Size="0.7em" ForeColor="#CCCCCC"
HorizontalAlign="Center" />
<MenuVerbStyle BorderColor="#5D7B9D"
BorderStyle="Solid" BorderWidth="1px" ForeColor="White" />
<PartStyle Font-Size="0.8em" ForeColor="#333333" />
<TitleBarVerbStyle Font-Size="0.6em"
Font-Underline="False" ForeColor="White" />
<MenuPopupStyle BackColor="#5D7B9D"
BorderColor="#CCCCCC" BorderWidth="1px" Font-Names="Verdana"
Font-Size="0.6em" />
<PartTitleStyle BackColor="#5D7B9D" Font-Bold="True"
Font-Size="0.8em" ForeColor="White" />
</asp:WebPartZone>

Thanks a lot in advance.

Zhenzhong
 
G

Guest

Never mind, I figured it out, the attribute is named "TitleIconImageUrl", but
here comes another problem, I cannot seem to be able to drag and drop from
grabbing the image. Is there a workaround for this?

Zhenzhong
 
G

Guest

Lots of properties in webparts easy for me to get switched up. Glad you
found it.
 
G

Guest

Thanks, I got this done by using a CSS style sheet and set the actual image
as the background. it works like a charm :)

Zhenzhong
 
G

Guest

How did you do that? you don't use Titleiconimageurl,do you? Since that
property only puts a icon in the front of text title? I assume you need a
image to cover all title bar.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top