On Thu, 2005-10-13 at 16:30 -0300, Rafael Teixeira wrote: > I have a patch pending approval for more than a month now to correct > some miscalculations on the rectangle-size (it is not using the font > metrics to do it currently) that may cause this behaviour as it wraps > text incorrectly, when the rectangle is to small.
Hey, I have actually fixed this behavoir this week. I'll be committing a patch today, and will merge your work in. Thanks! Jackson > An update version of the patch for TreeView.cs is attached. See if it helps. > > Regards, > > On 10/12/05, Pavel Bansky <[EMAIL PROTECTED]> wrote: > > Hello Mono folks, > > > > I found strange behaivor of TreeView under KDE. Selected node is hiden > > under 'selection' so you can't see the text. Seems like rectangle around > > selected item is filled with colour. Here is the screenshot > > http://bansky.net/treeview.png > > > > have a nice day > > > > Pavel > > > > > > Code goes here: > > > > using System; > > using System.Drawing; > > using System.Windows.Forms; > > > > namespace TreeViewTest > > { > > > > public class MyNode : TreeNode > > { > > public string filename; > > } > > > > public class MainForm : Form > > { > > private System.Windows.Forms.StatusBar statusBar1; > > private System.Windows.Forms.TreeView treeView1; > > private System.Windows.Forms.Button btnAdd; > > public MainForm() > > { > > this.btnAdd = new System.Windows.Forms.Button(); > > this.treeView1 = new System.Windows.Forms.TreeView(); > > this.statusBar1 = new System.Windows.Forms.StatusBar(); > > this.SuspendLayout(); > > > > this.btnAdd.Location = new System.Drawing.Point(8, 8); > > this.btnAdd.Name = "btnAdd"; > > this.btnAdd.Text = "button1"; > > this.btnAdd.Click += new > > System.EventHandler(this.BtnAddClick); > > > > this.treeView1.ImageIndex = -1; > > this.treeView1.Location = new System.Drawing.Point(104, 8); > > this.treeView1.Name = "treeView1"; > > this.treeView1.ItemHeight = 20; > > this.treeView1.Size = new System.Drawing.Size(121, 192); > > this.treeView1.AfterSelect += new > > System.Windows.Forms.TreeViewEventHandler(this.TreeView1AfterSelect); > > > > this.statusBar1.Location = new System.Drawing.Point(0, 223); > > this.statusBar1.Name = "statusBar1"; > > this.statusBar1.Size = new System.Drawing.Size(240, 22); > > this.statusBar1.Text = "statusBar1"; > > > > this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); > > this.ClientSize = new System.Drawing.Size(240, 245); > > this.Controls.Add(this.statusBar1); > > this.Controls.Add(this.btnAdd); > > his.Controls.Add(this.treeView1); > > this.Name = "MainForm"; > > this.Text = "MainForm"; > > this.ResumeLayout(false); > > } > > > > [STAThread] > > public static void Main(string[] args) > > { > > Application.Run(new MainForm()); > > } > > > > void BtnAddClick(object sender, System.EventArgs e) > > { > > MyNode mn = new MyNode(); > > mn.Text = "Some_file"; > > mn.filename = "some_name.txt"; > > treeView1.Nodes.Add(mn); > > } > > > > void TreeView1AfterSelect(object sender, > > System.Windows.Forms.TreeViewEventArgs e) > > { > > MyNode mn = (MyNode)treeView1.SelectedNode; > > statusBar1.Text = mn.filename; > > } > > > > } > > } > > > > > > -- > > __________________________________________________________ > > > > Pavel Bánský > > levap at bansky.net I write code... > > __________________________________________________________ > > > > _______________________________________________ > > Mono-winforms-list maillist - [email protected] > > http://lists.ximian.com/mailman/listinfo/mono-winforms-list > > > > > -- > Rafael "Monoman" Teixeira > --------------------------------------- > I'm trying to become a "Rosh Gadol" before my own eyes. > See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment. > It hurts! > _______________________________________________ > Mono-winforms-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-winforms-list _______________________________________________ Mono-winforms-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-winforms-list
