Home All Groups Group Topic Archive Search About
Author
15 Nov 2005 10:55 AM
richie_hackett
OK I have been tearing my hair out trying to get the Treeview
webcontrol to display a background image.


My current thinking is that mozilla allows you to render the treeview
as a table instead of using the htc.  Any ideas how this can be done
for all requests?  I have noticed that the Treeview control inherits
from the BaseRichControl which has a Browser Level check method


I figure if I can make the web page believe that the browser doesn't
support the htc component I can get the result I need.  However the
browser settings come from the headers which can't be editted(to the
best of my knowledge)


Any ideas on how I can extend... overload... modify... or butcher this

Author
15 Nov 2005 5:07 PM
Andrew Robinson
Richie,

Wrap your TreeView in a Table / TableCell and set the Table Cell Background
to your image:

<table>
  <tr>
  <td background="myBackground.jpg">
    <asp:TreeView ID="TreeView1" runat="server">
      <Nodes>
        <asp:TreeNode Text="New Node" Value="New Node">
          <asp:TreeNode Text="New Node" Value="New Node">
            <asp:TreeNode Text="New Node" Value="New Node">
              <asp:TreeNode Text="New Node" Value="New Node"></asp:TreeNode>
            </asp:TreeNode>
          </asp:TreeNode>
        </asp:TreeNode>
      </Nodes>
    </asp:TreeView>
  </td>
</tr>
</table>

Show quoteHide quote
"richie_hackett" <richie_hack***@hotmail.com> wrote in message
news:1132052142.961996.45620@g14g2000cwa.googlegroups.com...
> OK I have been tearing my hair out trying to get the Treeview
> webcontrol to display a background image.
>
>
> My current thinking is that mozilla allows you to render the treeview
> as a table instead of using the htc.  Any ideas how this can be done
> for all requests?  I have noticed that the Treeview control inherits
> from the BaseRichControl which has a Browser Level check method
>
>
> I figure if I can make the web page believe that the browser doesn't
> support the htc component I can get the result I need.  However the
> browser settings come from the headers which can't be editted(to the
> best of my knowledge)
>
>
> Any ideas on how I can extend... overload... modify... or butcher this
>
Author
15 Nov 2005 8:25 PM
richie_hackett
Unfortunately not.  I am using the microsoft.web.ui.controls component.
When you set a background the treeview picks up the background colour
but will not pick up the image.  This is the way the htc has been
written.  I have tried setting transparent for all nodes and it still
doesn't work, hence I was trying to make the component present the
treeview as a table not a htc.  Thanks anyway
Author
16 Nov 2005 3:18 AM
Andrew Robinson
Richie,

You have me a bit confused. Take a look at this:

http://www.binaryocean.com/samples/treeviewbackground/

There is a nice background image under the tree view.

When you say that you are using the Microsoft.web.ui.controls are you
talking about the old treeview navigation control? Why not give the built in
System.Web.UI.WebControls.TreeView control a try. Yes, you have to use
version 2.0 of the Framework.

Hope this helps or at least reduces my confusion over what you are trying to
do.

Show quoteHide quote
"richie_hackett" <richie_hack***@hotmail.com> wrote in message
news:1132086304.148563.26080@g14g2000cwa.googlegroups.com...
> Unfortunately not.  I am using the microsoft.web.ui.controls component.
> When you set a background the treeview picks up the background colour
> but will not pick up the image.  This is the way the htc has been
> written.  I have tried setting transparent for all nodes and it still
> doesn't work, hence I was trying to make the component present the
> treeview as a table not a htc.  Thanks anyway
>
Author
21 Nov 2005 10:31 PM
richie_hackett
Thats exactly what I want but I need it in 1.1 without buying it.
Basically someone speced a project and said it could be done without
checking.  At the 11th hour technical tried to put it in and it didn't
work so were out of budget and nearly out of time
Andrew Robinson wrote:
Show quoteHide quote
> Richie,
>
> You have me a bit confused. Take a look at this:
>
> http://www.binaryocean.com/samples/treeviewbackground/
>
> There is a nice background image under the tree view.
>
> When you say that you are using the Microsoft.web.ui.controls are you
> talking about the old treeview navigation control? Why not give the built in
> System.Web.UI.WebControls.TreeView control a try. Yes, you have to use
> version 2.0 of the Framework.
>
> Hope this helps or at least reduces my confusion over what you are trying to
> do.
>
> --
>
> Andrew Robinson
> www.binaryocean.com
> www.bellinghamdotnet.org
>
>
> "richie_hackett" <richie_hack***@hotmail.com> wrote in message
> news:1132086304.148563.26080@g14g2000cwa.googlegroups.com...
> > Unfortunately not.  I am using the microsoft.web.ui.controls component.
> > When you set a background the treeview picks up the background colour
> > but will not pick up the image.  This is the way the htc has been
> > written.  I have tried setting transparent for all nodes and it still
> > doesn't work, hence I was trying to make the component present the
> > treeview as a table not a htc.  Thanks anyway
> >