Richard Heintze schrieb:
I wanted to add the ability to change the opacity to
my GUI app. I added a 10 of menu entries with 10
handlers. It was grotesque! Is there a better way?
void Form1::Opacity100(System::Object* s,
System::EventArgs* e){
Opacity = 1.0;
}
void Form1::Opacity90(System::Object* s,
System::EventArgs* e){
Opacity = .9;
}
void Form1::Opacity80(System::Object* s,
System::EventArgs* e){
Opacity = .8;
}
Yes, I believe you should be able to create one event handler and check
the "sender" argument ("s" in your code).
Fabian