зеркало из https://github.com/mono/mail-archives.git
146 строки
6.1 KiB
HTML
146 строки
6.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Gtk-sharp-list] Notebook Widget
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Notebook%20Widget&In-Reply-To=fdf2899f0802240436g23b79a69scdc43c88f0c31893%40mail.gmail.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="008469.html">
|
|
<LINK REL="Next" HREF="008471.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Gtk-sharp-list] Notebook Widget</H1>
|
|
<B>Darwin Reynoso</B>
|
|
<A HREF="mailto:gtk-sharp-list%40lists.ximian.com?Subject=%5BGtk-sharp-list%5D%20Notebook%20Widget&In-Reply-To=fdf2899f0802240436g23b79a69scdc43c88f0c31893%40mail.gmail.com"
|
|
TITLE="[Gtk-sharp-list] Notebook Widget">monouser at gmail.com
|
|
</A><BR>
|
|
<I>Sun Feb 24 08:49:15 EST 2008</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="008469.html">[Gtk-sharp-list] Notebook Widget
|
|
</A></li>
|
|
<LI>Next message: <A HREF="008471.html">[Gtk-sharp-list] Need help in compilation
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#8470">[ date ]</a>
|
|
<a href="thread.html#8470">[ thread ]</a>
|
|
<a href="subject.html#8470">[ subject ]</a>
|
|
<a href="author.html#8470">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Chris never mind i got it working anyway thanks so much for your help.
|
|
|
|
On Sun, Feb 24, 2008 at 7:36 AM, Darwin Reynoso <<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">monouser at gmail.com</A>> wrote:
|
|
><i> Hi Chris, can you please tell me what i'm doing wrong i'm using monodevelop RC1
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> //create a page with a textview widget
|
|
</I>><i> protected virtual void onclicked (object sender, System.EventArgs e)
|
|
</I>><i> {
|
|
</I>><i> string label = "Hex File";
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> HBox hbox = new HBox();
|
|
</I>><i>
|
|
</I>><i> hbox.PackStart(new Label(label));
|
|
</I>><i>
|
|
</I>><i> Button close = new Button("X"); // Set this up with an image or whatever.
|
|
</I>><i>
|
|
</I>><i> close.Relief = ReliefStyle.None;
|
|
</I>><i>
|
|
</I>><i> close.FocusOnClick = false;
|
|
</I>><i>
|
|
</I>><i> close.Clicked += delegate {
|
|
</I>><i> hbox.Destroy();
|
|
</I>><i> textview.Destroy();
|
|
</I>><i> };
|
|
</I>><i>
|
|
</I>><i> hbox.PackStart(close);
|
|
</I>><i>
|
|
</I>><i> hbox.ShowAll();
|
|
</I>><i>
|
|
</I>><i> notebook1.AppendPage(textview, hbox);
|
|
</I>><i> notebook1.ShowAll();
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i>
|
|
</I>><i> }
|
|
</I>><i>
|
|
</I>><i> On Sun, Feb 24, 2008 at 6:08 AM, Chris Howie <<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">cdhowie at gmail.com</A>> wrote:
|
|
</I>><i> >
|
|
</I>><i> > On Sat, Feb 23, 2008 at 7:36 PM, Darwin Reynoso <<A HREF="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">monouser at gmail.com</A>> wrote:
|
|
</I>><i> > > Hi,
|
|
</I>><i> > > how do i add a close button widget to a notebook page kind of like
|
|
</I>><i> > > monodevelop tabs.
|
|
</I>><i> > >
|
|
</I>><i> > > here is my code
|
|
</I>><i> > >
|
|
</I>><i> > > //create a page with a textview widget
|
|
</I>><i> > > protected virtual void onclicked (object sender, System.EventArgs e)
|
|
</I>><i> > > {
|
|
</I>><i> > > //i need a textview so i can show a hex file
|
|
</I>><i> > > textview = new TextView();
|
|
</I>><i> > >
|
|
</I>><i> > > string label = "Hex output";
|
|
</I>><i> > >
|
|
</I>><i> > > notebook1.AppendPage (textview , new Label (label));
|
|
</I>><i> > >
|
|
</I>><i> > > notebook1.ShowAll();
|
|
</I>><i> > > }
|
|
</I>><i> > > i need to be able to close the page
|
|
</I>><i> > >
|
|
</I>><i> > > thanks
|
|
</I>><i> >
|
|
</I>><i> > Replace your AppendPage call with something like:
|
|
</I>><i> >
|
|
</I>><i> > ------8<------
|
|
</I>><i> > HBox hbox = new HBox();
|
|
</I>><i> > hbox.PackStart(new Label(label));
|
|
</I>><i> >
|
|
</I>><i> > Button close = new Button("X"); // Set this up with an image or whatever.
|
|
</I>><i> > close.Relief = ReliefStyle.None;
|
|
</I>><i> > close.FocusOnClick = false;
|
|
</I>><i> > close.Clicked += delegate {
|
|
</I>><i> > hbox.Destroy();
|
|
</I>><i> > textview.Destroy();
|
|
</I>><i> > };
|
|
</I>><i> > hbox.PackStart(close);
|
|
</I>><i> >
|
|
</I>><i> > hbox.ShowAll();
|
|
</I>><i> >
|
|
</I>><i> > notebook1.AppendPage(textview, hbox);
|
|
</I>><i> > ------8<------
|
|
</I>><i> >
|
|
</I>><i> > --
|
|
</I>><i> > Chris Howie
|
|
</I>><i> > <A HREF="http://www.chrishowie.com">http://www.chrishowie.com</A>
|
|
</I>><i> > <A HREF="http://en.wikipedia.org/wiki/User:Crazycomputers">http://en.wikipedia.org/wiki/User:Crazycomputers</A>
|
|
</I>><i> >
|
|
</I>><i>
|
|
</I></PRE>
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="008469.html">[Gtk-sharp-list] Notebook Widget
|
|
</A></li>
|
|
<LI>Next message: <A HREF="008471.html">[Gtk-sharp-list] Need help in compilation
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#8470">[ date ]</a>
|
|
<a href="thread.html#8470">[ thread ]</a>
|
|
<a href="subject.html#8470">[ subject ]</a>
|
|
<a href="author.html#8470">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/gtk-sharp-list">More information about the Gtk-sharp-list
|
|
mailing list</a><br>
|
|
</body></html>
|