How to define mouse-over event for a icon

Hello,
I have defined a icon for a panel in my plugin. I want that the icon should be changed on mouse over event.
The code for icon is given below.
resource PanelList (kDNDListsPaletteResourceID) {
                    // 1st panel in the list
                    kDNDListsPaletteResourceID,                    // Resource ID for this panel (use SDK default rsrc ID)
                    kIBPluginPluginID,                                             // ID of plug-in that owns this panel
          #if CSVER >= 4
                    kIsResizable,
          #else
                    isResizable,
          #endif
                    kIBClientPluginDNDPanelWidgetActionID,          // Action ID to show/hide the panel
                    kIBClientPluginDNDPanelTitleKey,               // Shows up in the Window list.
                    "",                                                           // Alternate menu path of the form "Main:Foo" if you want your palette menu item in a second place
                    0.0,                                                                                     // Alternate Menu position Alternate Menu position for determining menu order
                    kPlusIconPNGIconRsrcID, kIBPluginPluginID,                                                            // Rsrc ID, Plugin ID for a PNG icon resource to use for this palette
                    c_Panel
Where should I give the resourceID of the other icon?

Hi
First change the name from kPlusIconPNGIconRsrcID to kPlusIconPNGIconIRsrcID
so "I" will indicate that your icon is inactive
Create another resource id like:
#define kPlusIconPNGIconIRsrcID 15
#define kPlusIconPNGIconARsrcID 15
Define paths to the icons
resource PNGA(kPlusIconPNGIconIRsrcID) "../res/icons/PLUS_ICO_23_I.png" // Inactive icon
resource PNGR(kPlusIconPNGIconARsrcID) "../res/icons/PLUS_ICO_23_A.png" // Active icon
Regards
Bartek

Similar Messages

  • Mouse over event for every word inside a text?

    I want to do a separate mouse over event for every word inside a text.
    or at least get the string below the mouse cursor.
    any hint?
    henry

    There are no events for it but you can use TextField.getCharIndexAtPoint() to determine the character where the mouse is over, and from there you can work out the word where the mouse is over.

  • How to change mouse-over label for a mx:CandleStickChart?

    I have an <mx:CandleStickChart .../> graph and want to change the default
    labels on the mouse-over window.  For example by default, the mouse-over window displays:
      line1: some label
      line2: open: #1
      line3: close: #2
      line4: high:  #3
      line5: low: #4
    I want to change the words "open", "close", "high", "low" to something else.  I optionally want to not show  the "close" line.
    Do you have any suggestions on how to do this?  If you do, please provide a short example.
    Thanks for taking the time to help.

    Hi
    First change the name from kPlusIconPNGIconRsrcID to kPlusIconPNGIconIRsrcID
    so "I" will indicate that your icon is inactive
    Create another resource id like:
    #define kPlusIconPNGIconIRsrcID 15
    #define kPlusIconPNGIconARsrcID 15
    Define paths to the icons
    resource PNGA(kPlusIconPNGIconIRsrcID) "../res/icons/PLUS_ICO_23_I.png" // Inactive icon
    resource PNGR(kPlusIconPNGIconARsrcID) "../res/icons/PLUS_ICO_23_A.png" // Active icon
    Regards
    Bartek

  • Mouse over events on alv report?

    Hello,
    i want to make mouse over event for rows of a alv report.When mouse is on a row there will be shown explanations.
    how can i do this?
    thanks inn advance.

    Cem ,
    Please follow the code mentioned in the links below :
    Hotspot in ALV grid
    http://wiki.scn.sap.com/wiki/display/Snippets/Interactive?original_fqdn=wiki.sdn.sap.com
    Thanks
    Ankit

  • Mouse over solution for jdk1.0

    hi all,
    I am interested in making the equivalent of a mouse over solution for a java applet.
    Basically I'll have approximately 100 Rectangle objects representing images on the applet.
    When the person moves the mouse over these 100 rectangle objects, i'll use contains() method to determine if the mouse is over the object in question.
    If true, the image will be changed to represent the mouse over event .
    I thought for a msecond about looping through all the rectangle objects each time the mouse moves. but that seemed impractical since the mouse can move pretty quickly.
    It seemed to me the best option was to extend the Rectangle object and put an event listener on it . so that the Rectangle object can be triggered at the same time or individually as needed in response to the mousemove event .
    Does anyone have any thoughts about that ?
    does anyone know how I would possible implement something like that for java 1.0
    thanks
    stev

    it seems like I have to extend Component some how to get access to enableEvents method.
    Here is my class
    class ListeningRectangle extends Rectangle{
         public ListeningRectangle(int w, int x, int y, int z, Component c){
              super(w,x,y,z);
              c.enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
         public void mouseMoved (MouseEvent me) {
         System.out.println("event has been received by rectangle");
    I am using this class in conjunction with a java applet (targetted to 1.0-1.1 ).
    I'm passing a reference of the applet in to create this ListeningRectangle like this
    new ListeningRectangle(a,b,c,d,this);
    my objective is to have about 100 different rectangle areas defined on the java applet.
    and when the person moves the moves the mouse of the applet rapidly, only the appropriate ListeningRectangle object would respond.
    any ideas on how to get this done ? ?
    The full code is below
    stephen
    ================================
    full source code below
    import java.applet.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    public class TestEventHandler extends Applet implements Runnable{
         ///variables
         public static Color bgColor = Color.blue.darker();
         private Thread thread;
         public Graphics offGfx;
         private Image offImg;
         private Image basicOffImg;
         public static int xlen;
         public static int ylen;
    public ListeningRectangle lr;
         ///methods
         public void init(){
         xlen = size().width;
         ylen = size().height;
         basicOffImg = createImage(xlen, ylen);
         offImg = basicOffImg;
         offGfx = offImg.getGraphics();
         setBackground(bgColor);
         offGfx.setColor(bgColor);
         offGfx.fillRect(0, 0, xlen, ylen);
         offGfx.setFont(new Font("Arial, Helvetica, Helv", 1, 15));
         FontMetrics fontmetrics = offGfx.getFontMetrics();
         offGfx.setColor(Color.white);
         String s = "pleaseWait";
         offGfx.drawString(s, xlen / 2 - fontmetrics.stringWidth(s) / 2, ylen / 2);
              lr = new ListeningRectangle(20,20,50,50,this);
              offGfx.fillRect(20,20,50,50);
         public void start(){
         if(thread == null)
              thread = new Thread(this);
              thread.start();
         public void run(){
              while(thread != null){
         try
              Thread.sleep(100L);
              catch(InterruptedException _ex) { }
         public void stop()
              if(thread!=null)
         thread = null;
         public void update(Graphics g){ paint(g);}
         public void paint(Graphics g){
         g.drawImage(offImg, 0, 0, null);
    public boolean mouseDrag(Event event, int i, int j)
    if(true)
    return false;//means ripple
    } else
    return true;//means do not ripple for jvm1.0
    public boolean mouseMove(Event event, int i, int j)
    if(true)
    return false;
    } else
    return false;
    class ListeningRectangle extends Rectangle{
         public ListeningRectangle(int w, int x, int y, int z, Applet c){
              super(w,x,y,z);
              c.enableEvents(AWTEvent.MOUSE_MOTION_EVENT_MASK);
         public void mouseMoved (MouseEvent me) {
         System.out.println("event has been received by rectangle");
    }//end of class

  • Does Flash Engine supports "Mouse Over" events on an Android device with a mouse?

    We built our custome Android on a Beagle Board. When we play a Flash content on WebKit, the flash does not respond to mouse over events.
    When mouse pointer comes on an object with mouse over effect, nothing happends.
    Can you confirm that there is Mouse Over support in Android 2.2 Flash Engine?
    Thanks in Advance

    Thanks for the link. Im just stuck on one issue right now. I
    quickly noticed that the samples make use of mx.transitions.easing
    as seen in the script below. How does Flash 8 address this?
    myButton_btn.onRelease = function() {
    tweenBall(mx.transitions.easing.Bounce.easeOut);
    function tweenBall(easeType) {
    var begin = 20;
    var end = 380;
    var time = 20;
    var mc = ball_mc;
    ballTween = new mx.transitions.Tween(mc, "_x", easeType,
    begin, end, time);

  • Mouse over event

    Hello,
    I have two objects. First object (1) has event listener
    MOUSE_OVER. On this object is another object (2) without listener.
    When I move with the mouse on second object, mouse over event on
    object 1 is not dispatched. I don't know why. How can I do it ??
    thanks

    If both objects are in a VBox, with the second object (no
    listener) overlapping the first object (has listener), when you
    hover over second object, if you have a listener on the container
    you should be able to see if the target for the event is the second
    object and then take action.
    This is because events first "cascade" down from the top of
    the display list, through all containers until they reach the
    target (targetting phase), and then they bubble back up to the top
    of the display list (bubling phase).

  • Mouse Over Event handling - Webdynpro

    Hi,
    We are working on a sample Webdynpro application. We want to show a pop up window on Mouse over of a control. Is this possible in WebDynpro? Do we have a handle for the mouse over event!?
    Kindly help.
    Best Regards,
    Anusha

    hi anusha,
    If it is simply a tooltip that you would like to be displayed then there is a tooltip attribute that can be set when using the HTMLb controls, or the method setTooltip("my tooltip"); when using the APIs. If you need more of a mouse over event, then I would personally use standard HTML instead. You can use the same css classes that are used when creating HTMLb components so that the button would look the same, but it would be more under your own control
    some code snippets are there in this link if you are using bsp.
    Clicking a htmlb:button via Java Script
    thanks
    vishal

  • Detect clicked cluster in mouse down event for clusters within multiple stacked clusters

    With the help of Ben (see http://forums.ni.com/t5/LabVIEW/Determine-cluster-element-clicked-in-mouse-down-event/td-p/1245770)
    I could easily find out what sub-cluster had been clicked on (mouse down event) within the main cluster, by using the Label.Text Property.
    However if you have a cluster within a cluster within a cluster then you probably have to use individual mouse down events for each sub-sub cluster.
    I just wanted to use one "Main Cluster":Mouse Down event and from that determine which of the sub-sub clusters had been clicked on - is this even remotely possible?
    Chris.

    Chris Reed wrote:
    With the help of Ben (see http://forums.ni.com/t5/LabVIEW/Determine-cluster-element-clicked-in-mouse-down-event/td-p/1245770)
    I could easily find out what sub-cluster had been clicked on (mouse down event) within the main cluster, by using the Label.Text Property.
    However if you have a cluster within a cluster within a cluster then you probably have to use individual mouse down events for each sub-sub cluster.
    I just wanted to use one "Main Cluster":Mouse Down event and from that determine which of the sub-sub clusters had been clicked on - is this even remotely possible?
    Chris.
    Yes but... you will have to pass through 26 Kudos worth of Nuggets to get there (Well maybe you can skip the last 5 or so).
    This Nugget by Ton teaches us how to use Dynamic Event Registration. (15 Kudos, must read and understand)
    This Nugget by me talks about getting at references inside arbitrary data structures. (11 Kudos, You don't have to read the whole thing, only enough to get at nested objects).
    SO use the stuff I wrote about to gather up the references to the clusters. Build them into an array and then use dynamic event registration and what you learned in that thread you linked in your question.
    So Possible? Yes!
    Easy? YOU tell me.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Mouse Over event not dispatching properly.

    Hi,
    I am working on a scroll for iPhone, in which I'm using touch scrolling, it is working fine with less number of list items, but when I increases the nuber of items in scroll list, the mouse over event not propogates properly, I mean to say those events are overlapping due to some extra memory issue, can any one have any idea about it.
    I'm pasting code for your reference :
    public function IPhoneScroll( pContent:DisplayObjectContainer, pStage:Stage ) {
                                  _stage = pStage;
                                  _myScrollElement = pContent;
                                  _canvasHeight = _myScrollElement.height;
                                  start();
                                  // add handlers
                                  _myScrollElement.addEventListener(MouseEvent.MOUSE_DOWN, on_mouse_down);
                                  _myScrollElement.addEventListener(Event.ENTER_FRAME, on_enter_frame);
                        private function on_enter_frame(e:Event):void {
                                  if ( started )
                                            // decay the velocity
                                            if(_mouseDown) _velocity *= MOUSE_DOWN_DECAY;
                                            else _velocity *= DECAY;
                                            // if not mouse down, then move the element with the velocity
                                            if (!_mouseDown)
                                                      var textHeight:Number = _myScrollElement.height;
                                                      var y:Number = _myScrollElement.y;
                                                      var bouncing:Number = 0;
                                                      // calculate a bouncing when the text moves over the canvas size
                                                      if (y > 0 || textHeight <= _canvasHeight) // textHeight <= _canvasHeight => when the item is smaller than the stage.height, align to the top
                                                                bouncing = -y * BOUNCING_SPRINGESS;
                                                      }else if( y + textHeight < _canvasHeight){
                                                                bouncing = (_canvasHeight - textHeight - y) * BOUNCING_SPRINGESS;
                                                      _myScrollElement.y = y + _velocity + bouncing;
                        // when mouse button up
            private function on_mouse_down(e:MouseEvent):void
                if (!_mouseDown)
                    // get some initial properties
                    _mouseDownPoint = new Point(e.stageX, e.stageY);
                    _lastMouseDownPoint = new Point(e.stageX, e.stageY);
                    _mouseDown = true;
                    _mouseDownY = _myScrollElement.y;
                                            // add some more mouse handlers
                    _stage.addEventListener(MouseEvent.MOUSE_UP, on_mouse_up);
                    _stage.addEventListener(MouseEvent.MOUSE_MOVE, on_mouse_move);
            // when mouse is moving
            private function  on_mouse_move(e:MouseEvent):void
               if (_mouseDown)
                    // update the element position
                    var point:Point = new Point(e.stageX, e.stageY);
                    _myScrollElement.y = _mouseDownY + (point.y - _mouseDownPoint.y);
                    // update the velocity
                    _velocity += ((point.y - _lastMouseDownPoint.y) * SPEED_SPRINGNESS);
                    _lastMouseDownPoint = point;
            // clear everythign when mouse up
            private function  on_mouse_up(e:MouseEvent):void
                if (_mouseDown)
                    _mouseDown = false;
                    _stage.removeEventListener(MouseEvent.MOUSE_UP, on_mouse_up);
                    _stage.removeEventListener(MouseEvent.MOUSE_MOVE, on_mouse_move);
                        public function release():void
                                  _myScrollElement.removeEventListener(MouseEvent.MOUSE_DOWN, on_mouse_down);
                                  _myScrollElement.removeEventListener(Event.ENTER_FRAME, on_enter_frame);
                                  _myScrollElement = null;
    The highlighted part is working properly for less items but not for more number of items, lets say 200 movieclips in scroll lists.
    Please help me on this, thanks in advance.
    Vipul

    Hello.
    Look I have an idea, I donu2019t know if you already try it.
    Please give the format that you want percentage, decimals etc...
    In the Excel where the charts are being directed
    Then redirect de chart to the same cells, these with the porpoise of refreshing
    Now each serie have the format.
    Please let me now what happen with these

  • I movie 11: how do i find an event for a particular clip in my project

    I movie 11: how do i find an event for a particular clip in my project

    Thanks so much for your response.  I tried that though and it did not work... any other suggestions?

  • How to defined data carrier valued for Linux?

    Hi,
    I am Defining Data Carrier. But I don't understand "Data carrier type" value. Is this PC value data carrier type  for window? So If I want to define value data carrier for Linux. How to defined data carrier valued for Linux?
    Please advise,
    Duypm

    Hi Nikita,
    Refer the below mentioned links for your requirement.
    http://forums.sdn.sap.com/thread.jspa?threadID=412923
    http://forums.sdn.sap.com/thread.jspa?threadID=1639500
    Both have good guidelines on coding as well as configuration part.
    Regards,
    Deepak Kori

  • LV7: how to catch 'Value change' event for cursor position in XY graph?

    I try to catch an event when the cursor position of a graph's cursor
    changes. I created a reference for the cursor array and registered a dynamic
    event 'Value change' for it. The event does not fire when the cursor changes
    (either by dragging it with the mouse or by direct entry of a new value in
    the cursor's X or Y fields. In contrast, when I register e.g. the 'Mouse Up'
    event for the cursor array, the event IS detected.
    -Franz

    So this is the same behaviour as that of a regular control which also does
    not fire a 'Value changed' event when it gets updated by e.g. writing to a
    local.
    At least the cursor's behavior is consistent then...
    But unfortunately also the direct user interaction with the cursor's numeric
    field does not fire the event, which is NOT consistent.
    I was trying to catch cursor changes in my event loop and had used a 'Mouse
    Up' event of the graph indicator to look for cursor changes (whose last
    position I had kept in a local or shift reg). In order not to miss a direct
    user interaction in the numeric field I added the dynamic event 'Value
    change' to the same event case, but with no success, it missed the direct
    entry ...
    according to what you say this seems to b
    e a bug then...
    -Franz
    "Greg McKaskle" schrieb im Newsbeitrag
    news:[email protected]..
    > > I try to catch an event when the cursor position of a graph's cursor
    > > changes. I created a reference for the cursor array and registered a
    dynamic
    > > event 'Value change' for it. The event does not fire when the cursor
    changes
    > > (either by dragging it with the mouse or by direct entry of a new value
    in
    > > the cursor's X or Y fields. In contrast, when I register e.g. the 'Mouse
    Up'
    > > event for the cursor array, the event IS detected.
    > >
    >
    > The reason is that value change events fire when user action directly on
    > the control changes its value. They do not fire when other programmatic
    > value changes occur. If you are looking at a value change on the cursor
    > palette, user interaction with the numeric should fire it, but updates
    > due to cursor movement are more like programmatic updates.
    >
    > Additional events will likely be added in future
    releases, and these may
    > make it easier to catch cursor movement events on a graph.
    >
    > Greg McKaskle
    >

  • How to find the BTE event for FBCJ transaction code

    Hi All,
            i need to find the BTE event for Finance related transaction codes.i checked in the SWEL transaction code, didnt find any event triggered and the standard BADI doesnt suite my requirement.The transaction code  which i tried is FBCJ.can anyone help me how to find the BTE event for the above mentioned transaction.
    Thanks in Advance,
    lokesh kumar.K

    Hello Lokesh,
    The following is one of the process of finding a BTE and implementing it.
    (1)Goto transction FIBF .Execute it with Attribute type = 'A'. Then in the menubar Environment->Info System (P/S )
           Go through the list of BTE's available with the description available beside.
    (2)Select the BTE you want to implement.
    (3)Press button Sample function module
    (4)This brings you to SE37 - Copy the sample function module to a Z-function module (First create a new function group for the function module) . Note: The name of the Z-functionmodule is not important
    (5)Edit the code in the new function module
    (6)Go back to transaction FIBF - Menu Settings->Products -> Of a customer and create a new product whicj identifies the new product . Remember to mark the Active field.
    (7)Go back to FIBF menu Settings->P/S function modules->of a customer - Create an entry that links the BTE and Product with the new function module
    Hope this will help.
    Regards,
    Samson

  • Problems with Mouse Down event for a picture control embedded in tab.

    I noticed that when trying to get a Mouse Down event for a picture control that the Mouse Down will not be 'fired' if the picture is embedded in a tab control. It also appears that this problem exists for other controls (I only tested a slider in addition to the picture). It isn't much of an issue for me now as I can just poll the mouse property of the picture control, but the Mouse Down event has information that I may want access to in my next software revision (button pressed, and Alt mod). I could do that by handling the Mouse Down event for the tab itself and checking to see if the the mouse property isn't -1, -1 for the picture, but that seems a little bit too kludgy (sp?) to me and wouldn
    't address the issue with other control types. Any chance of this being addressed by a patch sometime in the next couple of months???
    Attachments:
    TabProblem.vi ‏69 KB

    The problem I reported above was in LV 6.1.
    As a work-around, I used the mouse down on the tab control and did the math to decide if the picture was clicked.
    I have been told that this was fixed in LV 7.0. I can not confirm.
    You could call NI and ask about the service request number I cited above.
    I hope this helps,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for