[Gtk-sharp-list] Notebook Suggestions

Carlos J. Muentes carlos at rockwithme.org
Mon Jun 26 00:50:44 EDT 2006

No one has gotten back to me on this.  I wouldn't mind making the
changes myself (I have other ideas too, including some for the TreeView
control), I would like to know how I can contribute these changes?  I
realize the Gtk mono controls are a managed implementation of the
native gtk libraries, but perhaps it's time to stray away from the
original implementation and head towards a cleaner implementation of
some of these controls.  How can I contribute?

> -------- Original Message --------
> Subject: [Gtk-sharp-list] Notebook Suggestions
> From: "Carlos J. Muentes" <carlos at rockwithme.org>
> Date: Wed, June 21, 2006 10:25 am
> To: gtk-sharp-list at lists.ximian.com
> I posted this to the mono mailing list, and someone mentioned I should
> post it here instead, so this is _not_ a cross post =^):
> I've been working with the Notebook control and there are some quirks
> that I wouldn't mind seeing some changes to:
> Tab Pages Exposed As A Collection
> ==================================
> - Tab pages should be a collection, with that collection being exposed
> as a property of an instance of NoteBook i.e.:
>  Notebook notebook = new NoteBook();
>  notebook.TabPages.Add( "This is a new page" );
>  TabPage tabpage = notebook.TabPages[0];
>  tabpage.Text = "This is new text on the same tab page";
> - The example brings me to my next point: Tab page labels should be
> added automatically, and exposed as the "Text" or "Title" property for
> a single tab page.  In the example above, I am setting the "Text/Title"
> property of a new page.  
> Why expose a collection of tab pages
> =====================================
> Exposing the child tab pages in a Notebook as a collection would allow
> things like:
>  int i = notebook.TabPages.Count;
>  TabPage tabpage = notebook.TabPages["page1"];
> And would eliminate (IMHO) ugly methods like:
> GetNthPage(),
> GetTabLabel(),
> of which, GetNthPage is misleading because it doesn't even return the
> NotebookPage, but returns an instance of Widget, which still cannot be
> casted to a NotebookPage!
> Can Still Retain Advanced Label Functionality
> =============================================
> Perhaps for more advanced formatting, you can still expose the tabs
> label as a Label property:
>  TabPage tabpage = notebook.TabPages[0];
>  tabPage.Label.RederIcon(...);
> Reference To Current TabPage, Not Index Of
> =========================================
> The Page property is also misleading; it should
> not return the index of the active page, but rather should return a
> reference to the active page:
>  notebook.Page.Text = "Some new text for this tab(again)";
> Summary
> ========================================
> I think with these few changes to the Notebook, it can be a very
> powerful tab-based container, and would propel it past the TabControl
> control in .NET which (again IMHO) is much easier to work with and more
> logically structured.
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

More information about the Gtk-sharp-list mailing list