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.

Similar Messages

  • 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

  • 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

  • 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

  • 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 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

  • 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).

  • Is there a way to setup a repeating event for every 5th Sunday?

    I want to have a repeating event for every 5th Saturday, or 5th Sunday. Is there a way of doing that. I only see options for the first, second, third, forth, or last.

    Click get into on the event you have created, click repeat, and then custom. You can then choose "weekly" every (5) weeks and which day of the week to repeat it on.

  • Can't seem to customize repeat event for every Tu & Thu with OS 10.9.2 and iCal 7.0

    Used to be able to customize events in previous versions of iCal.  Now, trying to customize event for every Tue & Thu and even when I click "customize" on repeat event, only options are "daily, weekly, monthly, etc"  - not really flexible.
    Have tried removing p-list and restarting iCal and computer but no improvement.
    Currently using OS 10.9.2 with iCal 7.0.
    Does anyone have a solution?
    Thanks,
    MJ

    MJ,
    Where are you clicking on "customize?" Are you using the iPhone?
    This is what I am presented with when choosing "repeat" on my iMac:

  • 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

  • Tooltips when placing mouse over event

    First thing - I LOVE iMac, it's an incredible design of what real computer should be. I wish somebody told me that 10 years ago or more.
    I just switched from PC. On PC I used an excellent piece of calendar software, "UK Kalender". It's better than anything else.
    iCal is excellent too, I like it. But it seems to me, it's not polished.
    For example, font is too small. I'm not suggesting to have an option of all the fonts there are, and adjusting them, it will slow down the calendar. But at least to have 2 sizes: a small font(the current one) and a larger(like on Safari).
    Another thing. it's a question: is it possible to have toolltips when placing a mouse over an event ?
    In other words, when placing a mouse over an event, a tool tip shows up with all the info about this day's events.
    This would be extremely helpful, saving from double clicking and opening another window.

    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 listener? in Flash CS4 (AS3)

    Hi,
    I was wondering if there is such a thing as a mouse over listener.
    So that it would execute code when the mouse rolls over(and maybe also execute code when the mouse moves away again)
    Thank you for any help.

    yes, there are mouseover and rollover events, as well as, their "out" events:
    MouseEvent.MOUSE_OVER
    MouseEvent.ROLL_OVER

  • Want to handle event for component defined inside skin for host component

    Hi,
    Following is how my skinned button looks -
    As can be seen, there is a checkbox - which is a part part button skin.
    When mouse is over chckbox area and does clicked, I wanted to capture that event for checkbox as target. Objective is to mark checkbox as checked or unchecked when clicked on. I don't want checkbox to change its state when mouse is clicked over other area in button.
    Don't know whether it is possible or not. If yes, what is the best way to do it.
    Thanks in advance,
    Prithveesingh Zankat.

    Hello!
    I face the same problem with Failed to create delegate for component:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for component
    XXX.YYY.ZZZ..ume.Ume. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
    Caused by: java.lang.reflect.InvocationTargetException
    Caused by: java.lang.NoClassDefFoundError: com.sap.tc.webdynpro.model.webservice.gci.WSTypedModelClass
    I think this started after upgrading from 7.01 SP3 to SP5, but I'm not sure.
    What was it that solved your issue?
    *I found the error. My ProjectProperties.wdProperties did not contain the references it needed.*
    Edited by: Richard Linnander on Nov 23, 2009 2:33 PM

Maybe you are looking for

  • ICal Events on Tiger Not Showing Up in iCal on Snow Leopard

    Don't know that I've noticed this before but calendar events I insert on iCal running on 10.4.11 (Tiger) do not appear after syncing in iCal on my laptop running Snow Leopard. What gives? Joe

  • Flex 4 FTE Charts Legend text is missing/sporadic

    I have enabled "Use Flash Text Engine in MX components" for my flex project.  The reason I want to do this is two fold: 1) I don't want to have to embed a font twice to just set embedAsCFF seperately for each.  2) The other reason is that FTE seems t

  • Product ID must have the format

    Hi. I have the next problem. when I create a product, the product ID must have the format 000000000000000000. I need to delete this format. what i can do. Thanks.

  • Results analysis: Valuation method 15 (RRB)

    Hi experts, Can i have a detailed example for posting lines for RA valuation method : 15 - Derive revenues from resource-related billing of dynamic line items warm regards ramSiva

  • Error Message when emailing a Presentation within PowerPoint 2007

    I have a user that is having issues when trying to email a Document/Presentation within the MS application. The user goes to Office Button>Send>Email and Receives :"An error occured while sending the presentation". I have completed a MS Office repair