[MonoDevelop] Notebook Suggestions

"Andrés G. Aragoneses [ knocte ] "Andrés G. Aragoneses [ knocte ]
Tue Jun 20 19:09:23 EDT 2006


Carlos J. Muentes escribió:
> 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 return 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 that currently exists in a Notebook instance 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.

Hello. I agree totally with this suggestions but, AFAIK, this email
perhaps is more adequate in the Gtk# mailing list, and it's worth
creating a bug in bugzilla for it (if you do it, notify the bug number
here so we can add ourselves to the CC list or vote for it).

Regards,

	Andrés	[ knocte ]

-- 



More information about the Monodevelop-list mailing list