Sign in to follow this  
akira32

two Views and one toolbar(VC++)

Recommended Posts

This is a Painter program sample. There are two Views and one toolbar in this sample. Left View is called "GlobalView";Right View is called "MyView". When mouse click the "MyView", the toolbar will become enable. When mouse click the ""GlobalView, the toolbar will become disenable. My question is that Where is this mechanism (enable and disenable the toolbar)written in this sample code or How to set it. PS:The complete sample code in the website (http://ehome.hifly.to/attachment.php?s=&postid=8021).

Share this post


Link to post
Share on other sites
Any decent GUI library will have mouse click event handlers and an Enabled property or Enable()/Disable() methods. You shouldn't need to copy that from someone else's sample.

Since your question is so vague (what language? what framework?) and your link doesn't provide any useful extra information I can't help you beyond the pseudo-code:
MyView.MouseClick = { toolbar.Enable; }
GlobalView.MouseClick = { toolbar.Disable; }


To be honest this question comes very close to asking us to do your work for you, basic GUI things like this should be something one learns when starting out with graphical programs.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this