1. #1
    Ext User
    Join Date
    Jun 2008
    Posts
    15
    Vote Rating
    0
    Cravi is on a distinguished road

      0  

    Default ContextMenu for Text Component

    ContextMenu for Text Component


    Hi,

    I was looking for information about context menus for standard components, but all I can found in the forum was for trees and grids.
    So my issue is:
    I have a list of Textelements and for each element I set a context menu.
    But how can I get the information for which textelement the contextmenu was opened if I choose one of the menuitems?
    I set for each menuitem a listener but this listeners can give me only the Button back not the textelement... or am I wrong?

    Thanks for help.
    Cravi

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    DC Area =)
    Posts
    16,364
    Vote Rating
    81
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    if you look at the event handler displaying the menu, you'll see Ext.EventObject being passed. You can use that.getTarget() to get a reference to the element for which the event was generated.

  3. #3
    Ext User
    Join Date
    Jun 2008
    Posts
    15
    Vote Rating
    0
    Cravi is on a distinguished road

      0  

    Default


    Omph... Thanks really much for your answer...
    But I guess I clicked on the wrong forum....
    My Problem is in gxt....
    But thx anyway ;-)

    Maybe someone can move this post to the gxt 2.0 forum? Thx

Similar Threads

  1. Preventing browser contextmenu on ext contextmenu
    By Tewr in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 14 Apr 2010, 11:44 AM
  2. which component to use just for text?
    By mysticav in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 9 Nov 2008, 1:13 AM
  3. component to display text
    By v0n in forum Ext 2.x: Help & Discussion
    Replies: 6
    Last Post: 12 Jun 2008, 2:14 PM
  4. contextmenu on text field
    By polverari in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 21 Jun 2007, 7:07 AM

Thread Participants: 1