TreeListItem - set control width

Last post 10-25-2007, 1:51 PM by wzs5011. 2 replies.
Sort Posts: Previous Next
  •  10-24-2007, 2:13 PM 34567

    TreeListItem - set control width

    I am populating the LINKS dropdown programmatically via an XmlDocument.

    //Add items by code

    CuteEditor.TreeListItem rootitem = new CuteEditor.TreeListItem("Files", null);

    rootitem.Selectable = false;

    tdd.Items.Add(rootitem);

    XmlNodeList pNodes = pDoc.SelectNodes("./files/file");

    foreach (XmlNode pNode in pNodes)

    {

      string sNodeValue = pNode.Attributes.GetNamedItem("value").InnerText;

      string sURL = WebUtilTools.GetURL(this.State.Value, this.City.Value, this.Web.Value) + sNodeValue;

      rootitem.Items.Add(sNodeValue, sNodeValue, sURL);

    }
     
    My custom toolbar.config file has an entry:
    <item type="treedropdown" name="LinkTree" text="Links/Files" width="300" command="InsertLink" />
     
    When I pop up the entry in the runtime version of the editor, the links/files control is 300px wide, but the floating treelist control is much smaller and has a vertical and horizontal scroll bar - is there any way to customize the width of the treelist control to match the width of the dropdown control?
     
    Thanks
  •  10-25-2007, 10:53 AM 34600 in reply to 34567

    Re: TreeListItem - set control width

    wzs5011,
     
    >>is there any way to customize the width of the treelist control to match the width of the dropdown control?
     
    No. The widh of treelist is controled by the width of its content.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  10-25-2007, 1:51 PM 34615 in reply to 34600

    Re: TreeListItem - set control width

    I found a workaround.
     
    The "bug" here is that since the treelist is initially collapsed, the width is determined by the total width of the Level 1 tree entries.
    I padded &nbsp;'s into the common.config file for first tree link item.
     
    It would be nice if you could expose property on the TreeList control.  In the meantime, this works nicely.
     
    Thanks for the feedback.

    <treedropdowns>

    <LinkTree>

    <item text="wzs5011" Selectable="False">

    <html><![CDATA[Adam Needs a Vacation&nbsp;<img border=0 align='absMiddle' src='http://blah.com/img.gif'/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]></html>

    <item text="Aruba" value="http://www.arubatourism.com/">

    <html><![CDATA[Holiday in Aruba]]></html>

    </item>

    </item>

    </LinkTree>

    </treedropdowns>

View as RSS news feed in XML