зеркало из https://github.com/mono/mail-archives.git
134 строки
4.9 KiB
HTML
134 строки
4.9 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Gtk-sharp-list] Scrolled TreeView without scrollbars?
|
||
|
</TITLE>
|
||
|
<LINK REL="Index" HREF="index.html" >
|
||
|
<LINK REL="made" HREF="mailto:lists-christian%40rudh.se">
|
||
|
<META NAME="robots" CONTENT="index,nofollow">
|
||
|
|
||
|
<LINK REL="Previous" HREF="005224.html">
|
||
|
<LINK REL="Next" HREF="005228.html">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#ffffff">
|
||
|
<H1>[Gtk-sharp-list] Scrolled TreeView without scrollbars?
|
||
|
</H1>
|
||
|
<B>Christian Rudh
|
||
|
</B>
|
||
|
<A HREF="mailto:lists-christian%40rudh.se"
|
||
|
TITLE="[Gtk-sharp-list] Scrolled TreeView without scrollbars?">lists-christian@rudh.se
|
||
|
</A><BR>
|
||
|
<I>Sun, 12 Dec 2004 01:20:09 +0100</I>
|
||
|
<P><UL>
|
||
|
<LI> Previous message: <A HREF="005224.html">[Gtk-sharp-list] Scrolled TreeView without scrollbars?
|
||
|
</A></li>
|
||
|
<LI> Next message: <A HREF="005228.html">[Gtk-sharp-list] ANNOUNCEMENT: Mono SQL Query For GTK# 0.01 Development Release
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#5226">[ date ]</a>
|
||
|
<a href="thread.html#5226">[ thread ]</a>
|
||
|
<a href="subject.html#5226">[ subject ]</a>
|
||
|
<a href="author.html#5226">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<!--beginarticle-->
|
||
|
<PRE>Hi
|
||
|
|
||
|
Thanks for your input, I followed your example and did the following:
|
||
|
(I added the VBox since Window doesn't have .PackStart, don't know if it
|
||
|
was how you meant)
|
||
|
|
||
|
|
||
|
public class MyWindow : Window {
|
||
|
|
||
|
public MyWindow () : base ("MyWindow")
|
||
|
{
|
||
|
VBox b = new VBox();
|
||
|
this.Add(b);
|
||
|
|
||
|
ScrolledWindow sw = new ScrolledWindow ();
|
||
|
b.PackStart (sw, true, true, 0);
|
||
|
|
||
|
TreeStore _treeStore = new TreeStore (typeof (string));
|
||
|
TreeIter _rootIter = _treeStore.AppendValues
|
||
|
("ConnectionsConnectionsConnectionsConnections");
|
||
|
TreeView _treeView = new TreeView (_treeStore);
|
||
|
_treeView.AppendColumn ("Connections", new CellRendererText (),
|
||
|
"text", 0);
|
||
|
_treeView.HeadersVisible = false;
|
||
|
|
||
|
sw.Add (_treeView);
|
||
|
this.ShowAll ();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
But this gives the default behaviour: If i resize the window so it is
|
||
|
narrower than the text in the column, the horizontal scrollbar
|
||
|
automatically appears.
|
||
|
|
||
|
/Christian
|
||
|
|
||
|
|
||
|
On Sat, 2004-12-11 at 17:39 -0500, Daniel Morgan wrote:
|
||
|
><i> I would not set any scrolling policy then.
|
||
|
</I>><i>
|
||
|
</I>><i> ScrolledWindow sw = new ScrolledWindow ();
|
||
|
</I>><i> this.PackStart (sw, true, true, 0);
|
||
|
</I>><i>
|
||
|
</I>><i> _treeStore = new TreeStore (typeof (string));
|
||
|
</I>><i> _rootIter = _treeStore.AppendValues ("Connections");
|
||
|
</I>><i>
|
||
|
</I>><i>
|
||
|
</I>><i> _treeView = new TreeView (_treeStore);
|
||
|
</I>><i> _treeView.AppendColumn ("Connections", new
|
||
|
</I>><i> CellRendererText (), "text", 0);
|
||
|
</I>><i> _treeView.HeadersVisible = false;
|
||
|
</I>><i>
|
||
|
</I>><i> sw.Add (_treeView);
|
||
|
</I>><i>
|
||
|
</I>><i> -----Original Message-----
|
||
|
</I>><i> From: <A HREF="mailto:gtk-sharp-list-admin@lists.ximian.com">gtk-sharp-list-admin@lists.ximian.com</A>
|
||
|
</I>><i> [mailto:<A HREF="mailto:gtk-sharp-list-admin@lists.ximian.com">gtk-sharp-list-admin@lists.ximian.com</A>] On Behalf Of Christian Rudh
|
||
|
</I>><i> Sent: Saturday, December 11, 2004 9:10 AM
|
||
|
</I>><i> To: <A HREF="mailto:gtk-sharp-list@ximian.com">gtk-sharp-list@ximian.com</A>
|
||
|
</I>><i> Subject: [Gtk-sharp-list] Scrolled TreeView without scrollbars?
|
||
|
</I>><i>
|
||
|
</I>><i>
|
||
|
</I>><i> Hi
|
||
|
</I>><i>
|
||
|
</I>><i> I have a TreeView with two columns inside a ScrolledWindow.
|
||
|
</I>><i>
|
||
|
</I>><i> If I add a long text to one of the columns, the window increases its witdh
|
||
|
</I>><i> to show all of the text. I don't want that.
|
||
|
</I>><i>
|
||
|
</I>><i> If I set the horizontal scrolling policy to auto or always the window width
|
||
|
</I>><i> isn't changed when the text is added which is good. But I now have a visible
|
||
|
</I>><i> scrollbar which I don't want.
|
||
|
</I>><i>
|
||
|
</I>><i> So is it somehow possible to have the window to not increase its witdh but
|
||
|
</I>><i> at the same time not show the scrollbar? So the user has to manually
|
||
|
</I>><i> increase the window width too see all of the text?
|
||
|
</I>><i>
|
||
|
</I>--
|
||
|
Christian Rudh <<A HREF="mailto:lists-christian@rudh.se">lists-christian@rudh.se</A>>
|
||
|
|
||
|
|
||
|
</PRE>
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI> Previous message: <A HREF="005224.html">[Gtk-sharp-list] Scrolled TreeView without scrollbars?
|
||
|
</A></li>
|
||
|
<LI> Next message: <A HREF="005228.html">[Gtk-sharp-list] ANNOUNCEMENT: Mono SQL Query For GTK# 0.01 Development Release
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#5226">[ date ]</a>
|
||
|
<a href="thread.html#5226">[ thread ]</a>
|
||
|
<a href="subject.html#5226">[ subject ]</a>
|
||
|
<a href="author.html#5226">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
</body></html>
|