Click here to Skip to main content
15,887,683 members
Articles / Programming Languages / C++/CLI

AnimatedRollupControl with C++/CLI

Rate me:
Please Sign up or sign in to vote.
4.89/5 (5 votes)
24 Aug 2008CPOL23 min read 33.3K   1.3K   20  
3dsMax style rollup control animated in C++/CLI
#pragma once

using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;

	/// <summary>
	/// Summary for DialogPanel
	///
	/// This class is one example of storing a reference to access the world outside of the 
	/// Rollup Control page. 
	/// That is, in MVC land this provides an interface from the Controller(s)
	/// (i.e. Click and MouseLeave Event Handlers in our little sample) to the 
	/// Model (i.e. our Form1).
	/// How it is Used: We create a rollup page of controls by adding a new UserControl or 
	/// Form item to the project that inherits from this class and the ClientForm property 
	/// is set to Form1. Then just create the page (i.e. drag the controls you want onto the 
	/// dialog panel in the Designer
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class DialogPanel : public System::Windows::Forms::UserControl
	{

	// potential circular dependency. The wisdom of using it...is up to you.
	protected:Form^ clientForm;

	public:
		DialogPanel()
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//			
		}
		
		property Form^ ClientForm
		{ 
			Form^ get(){ return clientForm;}
			void set(Form^ client){clientForm = client;}
		}


	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~DialogPanel()
		{
			if (components)
			{
				delete components;
			}
		}
	protected:
		
	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->SuspendLayout();
			// 
			// DialogPanel
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(284, 264);
			this->Name = L"DialogPanel";
			this->Text = L"DialogPanel";
			this->ResumeLayout(false);

		}
#pragma endregion
	};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions