Welcome Guest Search | Active Topics | Sign In | Register

Unable to reduce itemspacing in TreeView Options
AlexisVZ
Posted: Monday, September 3, 2007 12:36:43 PM
Rank: Advanced Member
Groups: Member

Joined: 8/27/2007
Posts: 44
Hello again,

I am trying to reduce the (vertical) itemspacing (I hope this is the vertical space between treenodes) in my Treeview. I have tried setting the itemspacing property of default, topgroup and toplevel item to 0, tried reducing padding and item height, but could not reduce the vertical space between treenodes below the default space. Is it possible ? If so, how ?

Best Regards,
Alexis
eo_support
Posted: Monday, September 3, 2007 1:13:11 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
Hi Alexis,

Yes. You certainly can reduce item spacing. I would check the settings in your LookItems first, because TreeNode inherits settings from there if an value is not specified on the TreeNode. If you can not find out what keeps the item spacing, please post your .aspx contents and we will help you to find out.

Thanks


AlexisVZ
Posted: Monday, September 3, 2007 1:21:41 PM
Rank: Advanced Member
Groups: Member

Joined: 8/27/2007
Posts: 44
I checked out the lookitems and still can't make it work. Can you have a look at my aspx contents ?

<eo:TreeView ID="TreeView1" runat="server" AutoSelectSource="ItemClick" ControlSkinID="None"
Height="100%" RaisesServerEvent="True" Width="300px" SingleExpandMode="TopLevelOnly">
<LookNodes>
<eo:TreeNode ItemID="_TopGroup">
<SubGroup ItemSpacing="1">
</SubGroup>
</eo:TreeNode>
<eo:TreeNode DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;"
ItemID="_TopLevelItem" NormalStyle-CssText="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 0px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 0px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none"
SelectedStyle-CssText="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
<SubGroup ItemSpacing="1">
</SubGroup>
</eo:TreeNode>
<eo:TreeNode DisabledStyle-CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;color:Gray;padding-bottom:1px;padding-left:1px;padding-right:1px;padding-top:1px;"
ItemID="_Default" NormalStyle-CssText="PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 0px; COLOR: black; BORDER-TOP-STYLE: none; PADDING-TOP: 0px; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; BORDER-BOTTOM-STYLE: none"
SelectedStyle-CssText="background-color:#316ac5;border-bottom-color:#999999;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#999999;border-left-style:solid;border-left-width:1px;border-right-color:#999999;border-right-style:solid;border-right-width:1px;border-top-color:#999999;border-top-style:solid;border-top-width:1px;color:White;padding-bottom:0px;padding-left:0px;padding-right:0px;padding-top:0px;">
<SubGroup ItemSpacing="1">
</SubGroup>
</eo:TreeNode>
</LookNodes>
<TopGroup Style-CssText="border-bottom-color:#999999;border-bottom-style:none;border-bottom-width:0px;border-left-color:#999999;border-left-style:none;border-left-width:0px;border-right-color:#999999;border-right-style:none;border-right-width:0px;border-top-color:#999999;border-top-style:none;border-top-width:0px;color:black;cursor:hand;font-family:Tahoma;font-size:10pt;padding-bottom:0px;padding-left:2px;padding-right:2px;padding-top:0px;">
</TopGroup>
</eo:TreeView>
eo_support
Posted: Monday, September 3, 2007 1:56:32 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,097
Hi Alexis,

We looked into it and found that the reason that you can not decrease ItemSpacing is because of the line images. By default the TreeView displays vertical lines and plus/minus signs when you expand a TreeNode. The vertical lines are actually made up of different type of "segments". The height of these "segments" determins the mininum node height.

You can either replace the default line images or set the TreeView not to display line images, or only display plus/minus sign. That way since those line images are not used, they won't be there keeping the node height.

Thanks
AlexisVZ
Posted: Monday, September 3, 2007 2:26:07 PM
Rank: Advanced Member
Groups: Member

Joined: 8/27/2007
Posts: 44
I set the TreeView to only display the plus/minus sign for now and it works great. Your support really rocks !


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.