NYGhost
2004.10.21, 04:23 PM
Hello there is me again!
This is the situation
All my edit menu items are enabled by default. when I click on a textfield some of the "edit" menu tems get disabled automatically by the system, but not turn on when the textfield looses focus.
the ideal setting would be that the items get re-enabled when I click on another control.
I was trying catching the {kEventClassCommand, kEventCommandUpdateStatus} from my custom control and it works, but EnableMenuItem() seems to be overriden by the system at some point after I enable the items.
Any Idea on how to get this working right?
thanks
MenuRef menu=GetMenuHandle (2);
case kEventCommandUpdateStatus:
switch (aCommand.commandID) {
case kHICommandCopy:
case kHICommandPaste:
case kHICommandCut:
EnableMenuItem (menu, 4);
EnableMenuItem (menu, 5);
EnableMenuItem (menu, 6);
EnableMenuItem (menu, 7);
result = noErr;
break;
}
This is the situation
All my edit menu items are enabled by default. when I click on a textfield some of the "edit" menu tems get disabled automatically by the system, but not turn on when the textfield looses focus.
the ideal setting would be that the items get re-enabled when I click on another control.
I was trying catching the {kEventClassCommand, kEventCommandUpdateStatus} from my custom control and it works, but EnableMenuItem() seems to be overriden by the system at some point after I enable the items.
Any Idea on how to get this working right?
thanks
MenuRef menu=GetMenuHandle (2);
case kEventCommandUpdateStatus:
switch (aCommand.commandID) {
case kHICommandCopy:
case kHICommandPaste:
case kHICommandCut:
EnableMenuItem (menu, 4);
EnableMenuItem (menu, 5);
EnableMenuItem (menu, 6);
EnableMenuItem (menu, 7);
result = noErr;
break;
}