How can I determ wich component (panel or grid) is under the mouse pointer when 'right-click' event occurs? I use api_component.getRightClickPoint() to get mouse coordinates, but can't apply api_application.getFocusedComponent(), cause of there is a blank space on the panel.

Thanks, Andrew

asked 12 Nov '13, 06:41

Andrew%20Pouckatch's gravatar image

Andrew Pouck...
accept rate: 0%

edited 13 Nov '13, 00:53

Hi Andrew,

If you want to make the distinction between a grid and a panel you can implement a generic procedure which determines if the right clicked object is a grid or panel:

procedure rightClick is
  v_event_t api_event.t_event;  
  v_event_t := api_application.getEvent;

  if v_event_t.objectType_cd = 'Panel' then
    api_application.showpopupmessage('rightClicked panel name: '||v_event_t.objectName_tx);
  elsif v_event_t.objectType_cd = 'Grid' then
    api_application.showpopupmessage('rightClicked grid name: '||v_event_t.objectName_tx);
  end if;


Then, you should define a rightClick event for each grid and panel and use the procedure above as the action code:

    <rightClick action="rightClick"/>
      <cell hAlign="Full" vAlign="Full">
        <grid name="grid" dataSource="yourDS">
            <rightClick action="rightClick"/>

Hope this helps,


answered 12 Nov '13, 15:04

Ibrahim%20Sandalli's gravatar image

Ibrahim Sand... ♦♦
accept rate: 25%

Hi Ibrahim,

api_application.getEvent() - ok!

Thank you


answered 13 Nov '13, 00:53

Andrew%20Pouckatch's gravatar image

Andrew Pouck...
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 12 Nov '13, 06:41

Seen: 1,239 times

Last updated: 13 Nov '13, 00:53

© Copyright Gerger 2017