Disable "Config structure" button in VA02 Item detail? - abap

I would like to hide the "Config structure" button in the header of the screen "Item derails: configuration" in the VA* transactions, for a certain item status.
I am debugging the Dynpro logic but it's quite difficult to find the right spot where I can implement my additional logic and what button it actually is (technically).
Any help and guidance is appreciated.
Thanks in advance.

Here is a way to locate the code which defines the buttons of the Application Toolbar in any Dynpro. You may then change the code to hide a button, etc.
The "Application Toolbar" is the line of buttons which appears at the top of the main screen area (what is shown in your screenshot), and it's selected by the ABAP statement SET PF-STATUS during the Process Before Output event of the Dynpro screen, right before the screen is displayed.
If you put the focus on the button (click without releasing and drag out of the button) and press the F1 key, you will see both the function code of the button and the GUI status it belongs to (screenshot for transaction code SE38):
Double-click the "Function" field to display the GUI Status:
You may then start the debugger (/h in the command field for instance) and use the feature "breakpoint at statement", to stop at every SET PF-STATUS. After the EXCLUDING word, you may exclude (hide) any function code you want (button, menu item or keyboard key; for information, here SYCR is not even defined in the GUI status, so it's ignored). As you can see, you may modify the code here:

Related

Web Dynpro Action on Button

There is some kind of Shopping Cart in which you have Product positions.
There is a Button in web dynpro which is supposed to copy the text from the Inputfield from one position to the others.
When I click one of the positions, and enter a text in the inputfield and click on copy to all other positions - it doesn't copy.
Only if I click the button twice it copies the position to the others. What am I doing wrong?
I'm not a web dynpro expert.
Could be an IE bug or some problem in the code.
You can check the onAction property of your button and also check if there's any loop in the events that could probably cause this "only for the second click" behavior.
Please share your Controller/View code so we can provide a complete answer.

Form sent to back on interaction with menu item

I've got two forms, one being frmMain and the other being frmDatasets. The idea is that frmDatasets is used to manage the application's datasets (it's a program for comparing sorting algorithms).
I have a MenuStrip on frmDatasets with a few items. I just decided to change the Add Dataset item to a drop-down menu with options for loading one from file, or generating one according to certain parameters. All well and good; just add the items, swap some icons around, and change the event handler's signature to handle the right Click event.
Except when I run the program, clicking on the Add Datasets top-level item for the first time sends frmDatasets to the back, displaying an inactive frmMain. Clicking the item again shows the dropdown menu as usual.
If I instead click another top-level menu item, that works just fine. But then simply hovering my mouse over the Add Dataset item causes the 'send to back' thing to happen.
I say "send to back", but it's really just putting it behind frmMain. It remains in front of other windows like Visual Studio and Firefox.
Anyone know what on Earth is going on with this form?
EDIT: If I show frmDatasets as a modal dialog, it stops the whole "sending to back" thing, but I still have to click the menu item twice before it shows the list.
EDIT2: Overriding the onClick event to call mnuAddDatasetDropDown.ShowDropDown removes the double-click issue, but it's only a solution if I keep the form as a modal dialog. Still gets sent to back. Overriding mouseEnter doesn't do anything to solve it.
Setting the TopMost property of frmDatasets from its Design view to 'true' fixed all of the problems I was having. No insight as to what was going on, unfortunately, but if anyone else is having this problem then hopefully it'll work for them too.

App calls Method on mouse click. How can I stop it?

So I am pretty new to Xcode and Objective C, I've been using it about 2 weeks now. I am building an app for OSX. One of the windows in the app has 5 text boxes, some labels and a submit button at the bottom. The submit button is linked to a method that closes the window, opens a new one and outputs the contents of the text boxes into one text field on the new window.
I had it working correctly, but now when I do anything but click on the top text field the submit method is called and the window closes. I can click on the black space in the window, but click on any of the objects calls the method. Also, pressing tab calls the method. I am not sure when I did to cause this error, but any insight or tips would be very useful.
Sorry if this is vague, I'm not even sure how to describe the problem. If you need any specific information please ask.
Try looking in Interface Builder. Ctrl Click or Right click on the each one of the fields that are responding with calling the function. See if they are linked to the function.
Also check the "responder" as was suggested earlier. You can do this by also right click or ctrl clicking the red responder box labeled "responder". See if anything in there maps to your function

Using Enter key to invoke different methods in Mac(objective c)

I am new to Objective c programming. I have created an application which has a UI with two buttons "Cancel" and "Ok". On clicking "Cancel", the application must terminate and clicking "Ok" must perform some task. Everything works fine. I am able to tab between these buttons and can call the required functionality by clicking space button.
All I want to do is, that when focus is on "Cancel" button(using tab key) then on clicking enter button from keyboard, my application should terminate and similarly, when focus is on "Ok" button then clicking enter should perform the desired functionality.
I have even set the 'setKeyEquivalent" property of the "Ok" and "Cancel" button, but I can only set unique keyequivalents. I also tried to read the title or tag value of the buttons and then call the required functionality but it didn't worked too.
Can someone please guide me how can I use enter button to invoke different functions depending upon the selected button in UI.
I think you don't want to set key equivalents for the buttons. You would want to override keyDown: and test for the enter key, then do the appropriate thing depending on which button had focus (which I think you could determine using NSWindow's firstResponder method).

Is it possible to make a statusbar like notepad in VB?

I made a notepad using vb 2008 and I am facing a problem who I'd make the Statusbar.
any idea will be great.
Note: I am using the Textbox to read and write text
Thank you
You need to add a StatusStrip control to your form.
To find it, open the Toolbox, expand the "Menus & Toolbars" section, and double-click on the one named "StatusStrip".
Double-clicking on the control in the Toolbox will automatically add it to your form, and dock it along the bottom, just like it is in Notepad.
Once the control is there, you can customize it by changing properties in the Properties window. If you want to add information to the status bar, you do that by adding sub-controls inside of it. Click the drop-down arrow next to the "new" icon, and you'll see a list of possible choices:
"StatusLabel" — displays static text
"ProgressBar" — displays a progress bar, indicating the progress of a background operation
"DropDownButton" — displays a drop-down button, to allow a choice of multiple options
"SplitButton" — displays a drop-down button that allows a choice of multiple options, but also invokes the default option by a single click on the button.