[Mono-winforms-list] Splitter

Jordi Mas jordi@ximian.com
Sat, 18 Dec 2004 13:59:32 +0100


El ds 18 de 12 del 2004 a les 11:18 +0100, en/na Aleksandar Dezelin va
escriure:
> Here is 90% stubbed version of the Splitter with SplitterEventHandler 
> and SplitterEventArgs. I hope it would be of some help to you.
> 
> Cheers,
> Aleksandar Dezelin
> 

Some comments:

1) Instead of checking for all the valid values of an enum:

if (value != DockStyle.Top && value != DockStyle.Bottom &&     value !=
DockStyle.Left && value != DockStyle.Right)        {
throw new ArgumentException("Invalid Splitter dock style.");

You can use Enum.IsDefined. For example:

if (!Enum.IsDefined (typeof (Orientation), value))
throw new InvalidEnumArgumentException (string.Format("Enum argument
value '{0}' is not valid for Orientation", value));

2) There are attributes missing like TabStop or SplitPosition and
methods. Check the MSDN documentation.

Regards!

Jordi,
-- 
Jordi Mas i Hernāndez
Homepage and LiveJournal at http://www.softcatala.org/~jmas