Click here to Skip to main content
15,893,588 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
#include "StdAfx.h"
#include "rolluppage1.h"
#include "Form1.h"


System::Void RollupPage1::control_Click(System::Object^  sender, System::EventArgs^  e) 
{
	// some added visual cues of interaction
	static bool pictureOn = false;
	if(sender == pictureBox1)
	{
		pictureOn = !pictureOn;
		if(pictureOn)
			pictureBox1->BackColor = Color::Red;
		else
			pictureBox1->BackColor = Color::White;
	}

	UpdateClientModelData(this->Name,sender->ToString());
		 
}

System::Void RollupPage1::control_MouseLeave(System::Object^  sender, System::EventArgs^  e)
{
	UpdateClientModelData(nullptr,nullptr);	
}

void RollupPage1::UpdateClientModelData(String^ pageName, String^ senderName)
{
	FormsRollupControl::Form1^ ourform = nullptr;
	if(clientForm)
	  ourform = (FormsRollupControl::Form1^)clientForm;
	if(ourform)
	{
		ourform->UpdateInfo(pageName,senderName);		
	}
}


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