Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Menus&Toolbars » ArrayCtrl and Menus switching
ArrayCtrl and Menus switching [message #13032] Wed, 05 December 2007 23:22 Go to next message
Alex is currently offline  Alex
Messages: 18
Registered: October 2007
Location: Germany
Promising Member
Hello,

I would like to switch some menuitems in dependence from the selections of a ArrayCtrl.
Means: when a row is selected, the menuitems should be enabled and when not, they should be disabled.

I have tried everything possible, but nothing works in that way.

Thanks,
Alex
Re: ArrayCtrl and Menus switching [message #13040 is a reply to message #13032] Thu, 06 December 2007 20:39 Go to previous message
Alex is currently offline  Alex
Messages: 18
Registered: October 2007
Location: Germany
Promising Member
So simple, if you know it.

First:
	ArrayCtrl TeList;
	...
	TeList.WhenCursor = THISBACK(SetBar);
	TeList.WhenKillCursor = THISBACK(SetBar);

Second:
void CalClient::FileMenu(Bar& bar)
{
bar.Add(TeList.IsCursor(),"Drucken",Images::TerminDruck(), THISBACK(DruckTermin));
	...

There are many examples in the source, but I have not found this, and so I have to agonize Wink.
Maybe not a bad idea to make a FAQ (or a "How to do ...") like this:
http://leonardoce.interfree.it/leowiki.html

Alex
Previous Topic: Fast menu navigation
Next Topic: MenuBar Color[BUG]
Goto Forum:
  


Current Time: Thu Mar 28 21:59:08 CET 2024

Total time taken to generate the page: 0.01434 seconds