|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
.NET 2.0 TreeView control vertical align problemEach node's text is two lines, and I want the expand image to align
with top vertically. Right now, it's aligned in the middle. I've looked through all properties of the treeview, but couldn't find one. Please help help help. shelly wrote:
> *Each node's text is two lines, and I want the expand image to align To accomplish what you are looking for, this is what I did:> with top vertically. > Right now, it's aligned in the middle. I've looked through all > properties of the treeview, but couldn't find one. Please help help > help. * 1. give the tree view a cssstyle: tree.ControlStyle.CssClass = "TreeControl" 2. create the css class in the style sheet as follow: div.TreeControl table td { vertical-align:top; } Hope this help -- chinkchink ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------ chinkchink wrote:
> * * Oops! hit the submit button too soon...revised post: 1. give the treeview a css class: Code: -------------------- treeview1.ControlStyle.CssClass = "TreeControl" -------------------- 2. create the css class in the style sheet as follow: Code: -------------------- div.TreeControl table td { vertical-align:top; } -------------------- This will top align all elements inside all table cells within the treeview control Hope this help -- chinkchink ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------ |
|||||||||||||||||||||||